rpc: fix the maxoffset check on the incoming path #84031
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #84017.
Fixes #84027.
Bug fix 1
Back in PR #34197 we mistakenly removed the .Offset field
sent by each RPC heartbeat, through which the remote node monitors
the current/client node's offset.
This looks bad, but is actually somewhat innocuous. This is because
we update the offset map and do the check on two situations:
latency between PingRequest-PingResponse.
The bug above only invalidates the first check. The second check still
occurs. Since all nodes are both client to another node, and server
for the same other node, we still get a check both ways on all pairs of
nodes.
Nonetheless, the half-way broken check reduces robustness overall. So
it's good to fix it.
Bug fix 2
Release note (bug fix): CLI
cockroachcommands connecting to aremote server will not produce spurious "latency jump" warnings any
more. This bug had been introduced in CockroachDB v21.2.