Skip to content

Commit

Permalink
Merge #40539
Browse files Browse the repository at this point in the history
40539: storage: don't use caller's context in {Maybe,Add}Async r=nvanbenschoten a=tbg

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

Co-authored-by: Tobias Schottdorf <tobias.schottdorf@gmail.com>
  • Loading branch information
craig[bot] and tbg committed Sep 11, 2019
2 parents bce673e + a8e1ddd commit acdabf6
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 acdabf6

Please sign in to comment.