Skip to content

Comments

Fix to bug accepting join request incorrectly#640

Merged
greensky00 merged 2 commits intoeBay:masterfrom
greensky00:pr3
Jan 15, 2026
Merged

Fix to bug accepting join request incorrectly#640
greensky00 merged 2 commits intoeBay:masterfrom
greensky00:pr3

Conversation

@greensky00
Copy link
Contributor

  • We should compare endpoint as well to avoid the case that two different clusters coincidentally have same server IDs.

* We should compare endpoint as well to avoid the case that two
different clusters coincidentally have same server IDs.
@greensky00 greensky00 requested a review from Copilot January 15, 2026 19:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug in the join request validation logic to prevent accepting join requests from different clusters that happen to have the same server IDs. The fix adds endpoint comparison in addition to server ID comparison.

Changes:

  • Enhanced cluster membership validation by comparing both server IDs and endpoints
  • Changed data structures from std::set<int32> to std::map<int32, std::string> to store server ID-endpoint pairs
  • Added clarifying comments about the purpose of endpoint comparison

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


// Build a set of server IDs from the request's cluster config
// Build a set of server IDs from the request's cluster config,
// excludeing the server itself.
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'excludeing' to 'excluding'.

Suggested change
// excludeing the server itself.
// excluding the server itself.

Copilot uses AI. Check for mistakes.
@greensky00 greensky00 merged commit f51ca25 into eBay:master Jan 15, 2026
1 check passed
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.

1 participant