-
Notifications
You must be signed in to change notification settings - Fork 38.7k
util: Use steady clock in SeedStrengthen, FindBestImplementation, FlushStateToDisk #27189
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
util: Use steady clock in SeedStrengthen, FindBestImplementation, FlushStateToDisk #27189
The head ref may contain hidden characters: "2303-bench-with-steady-clock-\u{1F642}"
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsNo conflicts as of last run. |
fa29875 to
1111e2f
Compare
|
Concept ACK for moving to monotonic clocks. Am I correct in my understanding that there are no current tests/benchmarks which are calling these while adjusting the system clock, but rather this is additional hardening for a user whose system clock happens to be changed while one of these is executing? I couldn't easily find any callsites which might be directly affected by this, only indirectly. i.e. The system clock happens to change during a call to The only remaining use of |
yes, I don't think the system clock is ever adjusted in tests. Usually, we'd use About the user-facing changes, this should only be an improvement:
|
john-moffett
left a comment
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.
ACK fa1b4e5
Good conceptual change, as there's no reason for (eg) an NTP adjustment to affect these things.
willcl-ark
left a comment
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.
ACK fa1b4e5
|
Concept ACK |
…stImplementation, FlushStateToDisk fa1b4e5 Use steady clock in FlushStateToDisk (MarcoFalke) 1111e2f Use steady clock in SeedStrengthen and FindBestImplementation (MarcoFalke) Pull request description: There may be a theoretical deadlock for the duration of the offset when the system clock is adjusted into a past time while executing `SeedStrengthen`. Fix this by using steady clock. Do the same in `FindBestImplementation`, which shouldn't be affected, because it discards outlier measurements. However, doing the same there for consistency seems fine. Do the same in `FlushStateToDisk`, which should make the flushes more steady, if the system clock is adjusted by a large offset. ACKs for top commit: john-moffett: ACK fa1b4e5 willcl-ark: ACK fa1b4e5 Tree-SHA512: cc625e796b186accd53222bd64eb57d0512bc7e588312d254349b542bbc5e5daac348ff2b3b3f7dc5ae0bbbae2ec11fdbf3022cf2164211633765a4b0108e83e
There may be a theoretical deadlock for the duration of the offset when the system clock is adjusted into a past time while executing
SeedStrengthen.Fix this by using steady clock.
Do the same in
FindBestImplementation, which shouldn't be affected, because it discards outlier measurements. However, doing the same there for consistency seems fine.Do the same in
FlushStateToDisk, which should make the flushes more steady, if the system clock is adjusted by a large offset.