Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED] Possible race between connect and pub/sub with partitioning
In partitioning mode, when a client connects, the connect request may reach several servers, but the first response the client gets allows it to proceed with either publish or subscribe. So it is possible for a server running in partitioning mode to receives a connection request followed by a message or subscription. Although the conn request would be first in the tcp connection, it is then possible that the PubMsg or SubscriptionRequest be processed first due to the use of different nats subscriptions. To prevent that, when checking if a client exists, in this particular mode we will possibly wait to be notified when the client has been registered.
- Loading branch information
Showing
3 changed files
with
279 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters