You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kvserver/apply: use a better ctx for cmd.AckSuccess
Before this patch, CheckedCommand.AckSuccess() was called with a Raft
worker context. That's wasn't great because each command captures a
better context to use - one that derives from the proposal's ctx in the
case of local proposals. This patch switches to using that by exposing
the captured context through the Command interface. Taking advantage of
the new ctx, we also log a message now about early acks, as it seems
like a notable hint to see in a trace.
This patch also cleans up most existing uses of that captured context to
use the new interface method; before, various code paths were type
asserting the implementation of the Command, and getting the internal
context that way. This patch moves the resposibility of deciding what
context to use upwards, to callers.
Release note: None
0 commit comments