Skip to content

Conversation

@knz
Copy link
Contributor

@knz knz commented Jul 7, 2022

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:

  • when a server node gets pinged by a remote node using the remote-provided .Offset,
  • when receiving a ping response as client, using an estimate of the roundtrip
    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 cockroach commands connecting to a
remote server will not produce spurious "latency jump" warnings any
more. This bug had been introduced in CockroachDB v21.2.

@knz knz requested review from erikgrinaker and tbg July 7, 2022 19:50
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@knz
Copy link
Contributor Author

knz commented Jul 7, 2022

My testing plan is as follows:

  • for the 1st commit, check that the .Offset field in PingRequest is non-zero after 2 heartbeats
  • for the 2nd commit is to check that the .Offset field is zero in client-built PingRequests.

@erikgrinaker
Copy link
Contributor

LGTM!

@knz knz marked this pull request as ready for review July 16, 2022 21:07
@knz knz requested a review from a team as a code owner July 16, 2022 21:07
@knz
Copy link
Contributor Author

knz commented Jul 16, 2022

Added the tests. RFAL.

knz added 2 commits July 17, 2022 01:34
Back in PR cockroachdb#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:

- when a server node gets pinged by a remote node using the remote-provided .Offset,
- when receiving a ping response as client, using an estimate of the roundtrip
  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.

Release note: None
Release note (bug fix): CLI `cockroach` commands connecting to a
remote server will not produce spurious "latency jump" warnings any
more. This bug had been introduced in CockroachDB v21.2.
@knz
Copy link
Contributor Author

knz commented Jul 18, 2022

TFYR!

bors r=erikgrinaker

@craig
Copy link
Contributor

craig bot commented Jul 18, 2022

Build succeeded:

@craig craig bot merged commit a8568d2 into cockroachdb:master Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rpc: maxoffset check does not activate since PR #34197 cli: client commands using the RPC client code report undesirable warnings about latency jumps

3 participants