-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gossip: do not recommend self as node to forward to #5901
gossip: do not recommend self as node to forward to #5901
Conversation
This caused a failure to connect to a gossip network when bootstrapping if the bootstrap node told the other side to forward to itself. The client would see the forward address but refuse to do anything with it because it was already connected to the address it was being told to forward to. And since the bootstrap node was the only bootstrap address and this address was now exhausted we would never connect to the gossip network. Fixes cockroachdb#5879.
Curious why we only try each bootstrap address once? That seems fragile. Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion. gossip/server.go, line 189 [r1] (raw file): Comments from Reviewable |
how painful is writing a test for this going to be? Reviewed 1 of 1 files at r1. gossip/server.go, line 189 [r1] (raw file): Comments from Reviewable |
Well, there is a test: Review status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful. Comments from Reviewable |
We should always be retrying bootstrap addresses as long as there's not a connection outstanding. I made a comment on another PR from @tamird, but haven't had much time this week to look at what's really going on in there. I was a little nervous about the changes to gossip because not adding self to the bootstrap addresses was a carefully negotiated compromise to handle some tricky edge cases. There should have been better testing / comments in there, but alas. Review status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful. Comments from Reviewable |
I'm going to merge this sans-test as this fixes a bunch of acceptance test flakiness we've been seeing recently. See #5912. |
@spencerkimball You've got #5902 assigned to you. I'm not sure about the history of |
This caused a failure to connect to a gossip network when bootstrapping
if the bootstrap node told the other side to forward to itself. The
client would see the forward address but refuse to do anything with it
because it was already connected to the address it was being told to
forward to. And since the bootstrap node was the only bootstrap address
and this address was now exhausted we would never connect to the gossip
network.
Fixes #5879.
This change is