Skip to content
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

Fix non-deterministic behavior in last-use repopulation #12958

Merged
merged 1 commit into from
Nov 12, 2023

Commits on Nov 12, 2023

  1. Fix non-deterministic behavior in last-use repopulation

    This fixes an issue where some last-use tests would fail sporadically
    because the code that populates missing database entries was using the
    current time as it was iterating over the files. If the clock happened
    to roll over while it was iterating, then different files would get
    different timestamps non-deterministically.
    
    The fix is to snapshot the current time when it starts, and reuse that
    time while repopulating. I didn't do this originally just because I was
    reluctant to pass yet another argument around. However, it seems like
    this is necessary. In rust-lang#12634, we discussed other options such as having
    some kind of process-global "now" snapshot (like in `Config`), but I'm
    reluctant to do that because I am uneasy dealing with long-lived
    programs, or handling before/after relationships (like different parts
    of the code not considering that all timestamps might be equal). It
    might be something that we could consider in the future, but I'm not
    sure I want to try right now.
    ehuss committed Nov 12, 2023
    Configuration menu
    Copy the full SHA
    7637016 View commit details
    Browse the repository at this point in the history