Skip to content
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

fix: use current node address as default peer list #1388

Merged
merged 2 commits into from
Oct 18, 2024

Conversation

VinozzZ
Copy link
Contributor

@VinozzZ VinozzZ commented Oct 15, 2024

Which problem is this PR solving?

Short description of the changes

Since GetPeers() in redis peer implementation returns 127.0.0.1:8080 when no peer is present, it causes trace forwarding to fail if all peers have unregistered itself from the system.

  • use current node address as the default peer list

@VinozzZ VinozzZ requested a review from a team as a code owner October 15, 2024 21:11
@VinozzZ VinozzZ self-assigned this Oct 15, 2024
@VinozzZ VinozzZ added the type: bug Something isn't working label Oct 15, 2024
@VinozzZ VinozzZ force-pushed the yingrong/peer_default_address branch from b36af50 to 5baaef5 Compare October 15, 2024 21:40
@kentquirk
Copy link
Contributor

OK, but the reason that FilePeers returns one peer is that the old trace distribution code expected "peers" to include self, and everything expected at least one peer. And I think that this assumption is still valid for the partitioning code. So why do you ever expect 0 peers?

If we've changed that assumption, we maybe should instead make FilePeers not do that. I'm worried that there's an inconsistency here.

@VinozzZ VinozzZ force-pushed the yingrong/peer_default_address branch from 5baaef5 to 6d89650 Compare October 16, 2024 16:08
@VinozzZ VinozzZ changed the title fix: skip trace redistribution when number of peers is 0 fix: use current node address as default peer list Oct 16, 2024
@VinozzZ VinozzZ requested a review from kentquirk October 16, 2024 16:29
@VinozzZ VinozzZ merged commit 593549d into main Oct 18, 2024
6 checks passed
@VinozzZ VinozzZ deleted the yingrong/peer_default_address branch October 18, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants