From b311649ce42c6d4e220bb43e1e918e928663b117 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Fri, 14 Jun 2024 00:06:09 -0300 Subject: [PATCH] sweepbatcher: use write tx in DropBatch --- sweepbatcher/store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sweepbatcher/store.go b/sweepbatcher/store.go index b1a700c0..ff0ffa4a 100644 --- a/sweepbatcher/store.go +++ b/sweepbatcher/store.go @@ -111,7 +111,7 @@ func (s *SQLStore) InsertSweepBatch(ctx context.Context, batch *dbBatch) (int32, // DropBatch drops a batch from the database. Note that we only use this call // for batches that have no sweeps and so we'd not be able to resume. func (s *SQLStore) DropBatch(ctx context.Context, id int32) error { - readOpts := loopdb.NewSqlReadOpts() + readOpts := loopdb.NewSqlWriteOpts() return s.baseDb.ExecTx(ctx, readOpts, func(tx *sqlc.Queries) error { dbSweeps, err := tx.GetBatchSweeps(ctx, id) if err != nil {