Skip to content

Commit

Permalink
kvserver: hook up learner rollback task to tracing
Browse files Browse the repository at this point in the history
Release note: None
  • Loading branch information
knz committed Nov 18, 2021
1 parent cf21687 commit 6dd3dc7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/kv/kvserver/replica_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -1798,7 +1798,10 @@ func (r *Replica) tryRollbackRaftLearner(
})
return err
}
rollbackCtx := logtags.WithTags(context.Background(), logtags.FromContext(ctx))
rollbackCtx := r.AnnotateCtx(context.Background())
// AddTags and not WithTags, so that we combine the tags with those
// filled by AnnotateCtx.
rollbackCtx = logtags.AddTags(rollbackCtx, logtags.FromContext(ctx))
if err := contextutil.RunWithTimeout(
rollbackCtx, "learner rollback", rollbackTimeout, rollbackFn,
); err != nil {
Expand Down

0 comments on commit 6dd3dc7

Please sign in to comment.