Skip to content

Commit b311649

Browse files
committed
sweepbatcher: use write tx in DropBatch
1 parent 3fd3fab commit b311649

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sweepbatcher/store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func (s *SQLStore) InsertSweepBatch(ctx context.Context, batch *dbBatch) (int32,
111111
// DropBatch drops a batch from the database. Note that we only use this call
112112
// for batches that have no sweeps and so we'd not be able to resume.
113113
func (s *SQLStore) DropBatch(ctx context.Context, id int32) error {
114-
readOpts := loopdb.NewSqlReadOpts()
114+
readOpts := loopdb.NewSqlWriteOpts()
115115
return s.baseDb.ExecTx(ctx, readOpts, func(tx *sqlc.Queries) error {
116116
dbSweeps, err := tx.GetBatchSweeps(ctx, id)
117117
if err != nil {

0 commit comments

Comments
 (0)