Skip to content

Conversation

@tschneidereit
Copy link
Member

Resuming wizened snapshots means that clocks don't necessarily stay monotonic. This patch overrides clock_gettime to address that, by adding an offset determined at the end of wizening.

@andreiltd, this should fix the assert you encountered in #190, and hopefully allow us to do better on validating our GC rooting.

Resuming wizened snapshots means that clocks don't necessarily stay monotonic. This patch overrides `clock_gettime` to address that, by adding an offset determined at the end of wizening.

Signed-off-by: Till Schneidereit <[email protected]>
Copy link
Contributor

@guybedford guybedford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. If running on machines in different timezones, I wonder if we should also be doing a similar thing for the real time instead with a lower bound as opposed to an offset.

@tschneidereit
Copy link
Member Author

I don't think we need to do anything about the realtime clock: that is expected to vary, and in particular the timezone can change at any point even on one computer.

@tschneidereit tschneidereit merged commit 72e7481 into main Jan 20, 2025
5 checks passed
@tschneidereit tschneidereit deleted the ensure-monotonic-clock branch January 20, 2025 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants