Skip to content

Commit

Permalink
storage: don't use caller's context in {Maybe,Add}Async
Browse files Browse the repository at this point in the history
The callers context often cancels immediately after the operation is
enqueued, and that doesn't mean that we don't want to go ahead and
queue the replica.

Was seeing lots of messages about this in the logs.

Release note: None
  • Loading branch information
tbg authored and nvanbenschoten committed Sep 11, 2019
1 parent 4146821 commit a8e1ddd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/storage/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ func (bq *baseQueue) Async(
log.InfofDepth(ctx, 2, opName)
}
opName += " (" + bq.name + ")"
if err := bq.store.stopper.RunLimitedAsyncTask(ctx, opName, bq.addOrMaybeAddSem, wait,
if err := bq.store.stopper.RunLimitedAsyncTask(context.Background(), opName, bq.addOrMaybeAddSem, wait,
func(ctx context.Context) {
fn(ctx, baseQueueHelper{bq})
}); err != nil && bq.addLogN.ShouldLog() {
Expand Down

0 comments on commit a8e1ddd

Please sign in to comment.