-
Notifications
You must be signed in to change notification settings - Fork 33
Labels
OCIWork exclusive to OCI teamWork exclusive to OCI teambugThe product is not working as was intended.The product is not working as was intended.👍 lgtm
Milestone
Description
See #1243 for additional info.
The current scheme still leaves duplicates in some race conditions. A simpler approach was recently attempted. See #1108. However, this approach had a race condition so that it would sometimes disconnect both connections; reverted in #1186. The issue is that the connection and handshake messages can be sent from each node at the same time. Both nodes can consider the other a duplicate at the same time and both disconnect.
We believe the race condition can be solved using the following technique.
- On disconnect because of duplicate connection, do not attempt an immediate retry of the connections.
- When connecting to a peer, verify there is not already a open connection to that peer node_id.
a. Note the node_id of the connection must be saved on close to make this determination. - Maintain the logic of closing a duplicate if node's
node_idless than peernode_id.
Metadata
Metadata
Assignees
Labels
OCIWork exclusive to OCI teamWork exclusive to OCI teambugThe product is not working as was intended.The product is not working as was intended.👍 lgtm
Type
Projects
Status
Done