-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid assigning duplicate RAFT IDs to new nodes. (#5571)
Currently, zero uses the MaxRaftId to assign RAFT IDs to new nodes. However, the MaxRaftId value is not immediately updated and the lock is released in between creating the proposal and sending the proposal to the RAFT node. This can lead to situations where more than one new node is assigned the same ID. To solve this, this change introduces a new field to generate the IDs that is updated immediately, thus preventing multiple nodes from being assigned the same ID. Fixes #5436
- Loading branch information
Showing
2 changed files
with
11 additions
and
1 deletion.
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