New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Leader Election timeout configurable #3263
Make Leader Election timeout configurable #3263
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docker compose up
is complaining
System.ArgumentOutOfRangeException: leaderElectionTimeout should be greater than 1 second. (Parameter 'leaderElectionTimeout')
3f1f715
to
e0c302c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed an issue which isn't directly related to this PR:
Setting --leader-election-timeout-ms to 1 millisecond (I've commented out the >= 1 second check) then making two nodes elect a leader crashes both nodes with the following error:
[11102Unhandled exception. , 4,11:09:32.628,FTL] Global Unhandled Exception occurred.
System.NullReferenceException: Object reference not set to an instance of an object.
at Grpc.Net.Client.Internal.GrpcCall`2.DeadlineExceededCallback(Object state)
at System.Threading.TimerQueueTimer.<>c.<.cctor>b__23_0(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.TimerQueueTimer.CallCallback(Boolean isThreadPool)
at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool)
at System.Threading.TimerQueue.FireNextTimers()
at System.Threading.TimerQueue.AppDomainTimerCallback(Int32 id)
bb44607
- Adds the LeaderElectionTimeoutMs option which configures the LiveUntil and Deadlines of messages in ElectionsService - Only accept the LiveUntil timespan on messages to send over gRPC. The LiveUntil will be used for the deadline - Don't use the GossipInterval as a LiveUntil in the GossipService Co-authored-by: Shaan Nobee <sniper111@gmail.com>
bb44607
to
2a69cef
Compare
Added: LeaderElectionTimeoutMs option to allow configuring the timeout for election messages.
Backports PR #3121 to 20.10.
Fixes https://github.com/EventStore/home/issues/605.
Adds the
LeaderElectionTimeoutMs
option which configures the LiveUntil and Deadlines of messages in ElectionsService