You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
extenddb-cache: panicking_refresh_does_not_leak_inflight_flag found a refresh still in flight after its 50 ms wait #910
thread 'tests::panicking_refresh_does_not_leak_inflight_flag' (4642) panicked at crates/cache/src/tests.rs:686:5:
second refresh must succeed after first one panicked; got SwrMetricsSnapshot { hits: 0, stale_hits: 2, misses: 1, negative_hits: 0, refresh_success: 0, refresh_failure: 0, refresh_skipped_inflight: 1, refresh_dropped_epoch: 0, invalidations: 0 }
The test primes the cache, waits 80 ms to pass the soft TTL, and reads the entry. That read starts a refresh, and the loader panics in it. The test then waits 50 ms, reads again to start a second refresh, waits 50 ms more, and expects refresh_success >= 1.
In this run the second read counted refresh_skipped_inflight: 1, so it found the first refresh still in flight. Either the panicking task had not ended within the 50 ms wait, or its guard did not clear the flag. The rerun passed.
#679 does not change crates/cache. I checked the failed run-tests jobs of the Test workflow's 724 runs since 26 October, including first attempts that a rerun replaced. None of them is another failure of this test. I have not reproduced it.
The test waited a fixed 50 ms for the panicking refresh task to end and clear its in-flight flag, then expected a refresh to have succeeded. On a busy runner the task had not finished unwinding in that time, so the next read found the first refresh still in flight and no refresh had succeeded yet.
A later change replaced the fixed waits with a poll that reads until a refresh succeeds, within a 10 second deadline. The in-flight flag is cleared by an RAII guard that runs on a panic, so the flag never leaks, and the fixed wait was the only cause.
Activity
eliseong commentedon Nov 18, 2026
Already fixed on main.
The test waited a fixed 50 ms for the panicking refresh task to end and clear its in-flight flag, then expected a refresh to have succeeded. On a busy runner the task had not finished unwinding in that time, so the next read found the first refresh still in flight and no refresh had succeeded yet.
A later change replaced the fixed waits with a poll that reads until a refresh succeeds, within a 10 second deadline. The in-flight flag is cleared by an RAII guard that runs on a panic, so the flag never leaks, and the fixed wait was the only cause.
Closing as already fixed.