[CONTROLLER-1144] Clustering: Initiate snapshot interferes with fake snapshot Created: 09/Feb/15 Updated: 30/Mar/15 Resolved: 30/Mar/15 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | mdsal |
| Affects Version/s: | Post-Helium |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Kamal Rameshan | 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: | 2692 |
| Priority: | Normal |
| Description |
|
During initiate snapshot (when being sent to follower), we do not set the captureSnapshotInitiated flag to true. Fake snapshot can kick in and mess up the indices. Also Initiatesnapshot should resemble the fake snapshot as for a slower follower the leader would keep sending snapshot after a real one. For a leader we can do a real snapshot based on the replicatedToAllIndex and not the last applied. This means that in a stable system, there would be less snapshot sent and more in-mem log entries For a follower, the real snapshot should follow the replicatedToAllIndex sent via Leader's AppendEntries |
| Comments |
| Comment by Kamal Rameshan [ 09/Feb/15 ] |
|
Also take care of InitiateSnapshots not getting kicked in more than once |
| Comment by Kamal Rameshan [ 09/Feb/15 ] |
|
The solution can be divided into following 5 parts 1. Avoid Initiate Snapshot happening more than once 2. Fake snapshot should not take place when an initiate has been initiated 3. Capture snapshot currently clears the log from lastApplied. It should resemble fake snapshot by making use of the replicatedToAllIndex. Followers should have the similar logic 4. Remove the Initiate snapshot message 5. Refactor to consolidate the fake and real snapshot logic to have these in one place. |
| Comment by Kamal Rameshan [ 09/Feb/15 ] |
|
https://git.opendaylight.org/gerrit/#/c/15091/ - covers 1 and 2 |
| Comment by Kamal Rameshan [ 11/Feb/15 ] |
| Comment by Kamal Rameshan [ 13/Feb/15 ] |
|
https://git.opendaylight.org/gerrit/15239 - covers 4 |
| Comment by Moiz Raja [ 24/Feb/15 ] |
|
Refactoring to cover 5 https://git.opendaylight.org/gerrit/#/c/15610 |