[CONTROLLER-1180] Clustering: Initialize right to leader in single-node cluster Created: 28/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: Tom Pantelis Assignee: Moiz Raja
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 2773
Priority: Normal

 Description   

The election timeout is calculated by multiplying the heartbeat interval by the election timeout factor. We're changing the default election timeout factor to 20 and keeping the heartbeat time out at 500 ms which means the election timeout will be 10 sec. This will alleviate/reduce spurious elections due to latencies and GC but will increase the time on startup in a single node cluster when it declares itself the leader. Currently it initializes to follower hoping to hear from a leader. If the election timeout occurs it goes to candidate to start a new election. If the candidate times out due to no peer response, if there's no peers configured it becomes the leader. So in single-node this will now take 20 sec before. However, since there's no peers configured, we know the follower and candidate stages will time out so we might as well initialize right to leader and avoid the time outs.



 Comments   
Comment by Moiz Raja [ 25/Mar/15 ]

https://git.opendaylight.org/gerrit/#/c/16909/

Generated at Wed Feb 07 19:54:53 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.