-
Notifications
You must be signed in to change notification settings - Fork 971
[Java] Make cluster publish leader heartbeat timeout to clients. #1805
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
[Java] Make cluster publish leader heartbeat timeout to clients. #1805
Conversation
aeron-cluster/src/main/resources/cluster/aeron-cluster-codecs.xml
Outdated
Show resolved
Hide resolved
bcf599d to
1dddf62
Compare
| if (ctx.newLeaderTimeoutNs() == NULL_VALUE) | ||
| { | ||
| ctx.newLeaderTimeoutNs(2 * (leaderHeartbeatTimeoutNs != NULL_VALUE ? | ||
| leaderHeartbeatTimeoutNs : ConsensusModule.Configuration.LEADER_HEARTBEAT_TIMEOUT_DEFAULT_NS)); | ||
| } | ||
|
|
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.
Why keep AeronCluster.Context#newLeaderTimeoutNs(long) given that we get value from the Cluster itself? After all we wanted to simplify configuration by implementing this.
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.
For tests and in case there are any unusual setups where the default doesn't work.
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.
For tests we can keep this functionality package-private.
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.
On the other hand, if we do keep it public why isn't there a system property for it then?
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.
For tests we can keep this functionality package-private.
I wouldn't assume it would be useful for our tests only.
On the other hand, if we do keep it public why isn't there a system property for it then?
Don't mind adding one. We don't have properties for everything, I guess only the typical options.
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.
To me newLeaderTimeoutNs is similar to messageTimeoutNs which is configurable via the system properties. So I suggest we add one for the former as well.
|
Overall looks good. The only issue is the remaining config option which we should hide/remove. |
Can you please elaborate? SBE supports versioning and as far as I see we use codecs correctly, i.e. they will account for different block lengths. |
You are absolutely right. I got confused. No problem here. P.S. I've pushed a test that proves that such change works. b3635fe |
An implementation of #1791 (comment)