Skip to content

Commit

Permalink
PublishPage: Try breaking lock with Serializable?
Browse files Browse the repository at this point in the history
  • Loading branch information
earthboundkid committed Apr 10, 2024
1 parent 49f3b3d commit 430e126
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/almanack/service-page.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ func (svc Services) PublishPage(ctx context.Context, page *db.Page) (err, warnin
var p2 db.Page
err = flowmatic.Do(
func() error {
return svc.Tx.Begin(ctx, pgx.TxOptions{}, func(txq *db.Queries) (txerr error) {
return svc.Tx.Begin(ctx, pgx.TxOptions{
IsoLevel: pgx.Serializable,
}, func(txq *db.Queries) (txerr error) {
defer errorx.Trace(&txerr)

p2, txerr = txq.UpdatePage(ctx, db.UpdatePageParams{
Expand Down

0 comments on commit 430e126

Please sign in to comment.