-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Don't touch ActiveTime in preSeal/postUnseal #24549
Conversation
… misled by our current behaviour, whereby ActiveTime gets set to "now" during postUnseal and to the zero time during preSeal. We sometimes preSeal/postUnseal while remaining the active node. Instead, only set these when we actually change active role.
CI Results: |
Build Results: |
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.
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.
LGTM. I can't think of any case where we'd rely specifically on the old behavior here and I suspect this restores the intended behaviour (certainly the expected behavior) which was presumably broken when we introduced ways to seal and unseal without standing down which I guess only applied to Integrated Storage?
Thanks for noticing the issue!
… misled by our current behaviour, whereby ActiveTime gets set to "now" during postUnseal and to the zero time during preSeal. We sometimes preSeal/postUnseal while remaining the active node. Instead, only set these when we actually change active role.
No, I think the preSeal/postUnseal-while-remaining-active behaviour goes back at least as far as replication - i.e. not IS-specific. But yeah, I think this is a strict improvement over the current behaviour. |
If a consumer of the sys/leader api relies on ActiveTime, they can be misled by our current behaviour, whereby ActiveTime gets set to "now" during postUnseal and to the zero time during preSeal. We sometimes preSeal/postUnseal while remaining the active node. Instead, only set these when we actually change active role.