[CONTROLLER-867] Clustering : Leader initializes commit index to last index Created: 19/Sep/14 Updated: 22/Sep/14 Resolved: 22/Sep/14 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | mdsal |
| Affects Version/s: | Helium |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Moiz Raja | Assignee: | Kamal Rameshan |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 1978 |
| Priority: | High |
| Description |
|
In the raft implementation when the Leader is created it's commit index is initialized to the last index in the log. This could be a problem in the following scenario. member-1 is a leader and it has commitIndex = 10 and lastIndex = 11 member-1 dies before it can switch the commitIndex to 11 and therefore apply state and return a success to the client A new election occurs in which member-2 gets chosen as the leader. Now member-2 assumes that it's commitIndex = 11 even though it does not have consensus from member-3. Evaluate if this is a problem. One possible fix for it would be to not change the commitIndex on the new Leader at all and let it sync up with it's followers before resetting it's commit index. |
| Comments |
| Comment by Kamal Rameshan [ 22/Sep/14 ] |
|
https://git.opendaylight.org/gerrit/#/c/11391/ Merged. |