Skip to content

[core] Fixed problem with possibly conflicting peer group id#1854

Draft
ethouris wants to merge 2 commits into
Haivision:masterfrom
ethouris:dev-fix-groupid-conflict
Draft

[core] Fixed problem with possibly conflicting peer group id#1854
ethouris wants to merge 2 commits into
Haivision:masterfrom
ethouris:dev-fix-groupid-conflict

Conversation

@ethouris
Copy link
Copy Markdown
Collaborator

@ethouris ethouris commented Mar 10, 2021

Fixes: #1838

Problem: Connections with group membership coming from two different applications may occasionally generate the same group ID. This way they are qualified to the same group on the listener side because of having the same peer group ID, although this is unwanted, as they should belong to different groups.

Solution: The peer group should be identified by three factors: Peer address, application ID and the peer group ID. This should fix the problem because:

  1. If peer addresses are different, they should be distinct, even with identical application ID and group ID, which are possible.
  2. If this is an application running on the same machine, they may have identical group ID and will have identical address, but the application ID will distinguish them
  3. If two connections come with the same peer address and the same application ID, they are in the same application, so if group IDs don't differ, they really come from the same group at the caller side.

CONTROVERSY:

There's currently no possible way to extend the Group-type handshake extension. There's a condition that rejects the group extension if it's of size more than 2. This condition must be first removed and only the release in which this is fixed could be in future treated as the oldest backward-compatible version that can work with the release where this PR is merged.

@ethouris ethouris added this to the v1.5.0 milestone Mar 10, 2021
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.

[BUG] Two caller in different processes may generate same group id.

1 participant