Commit 0b34063
[fix](test) Wait for the meta-store write to land, not just leave the queue
FSFileCacheLeakCleanerTest's add_metadata_entry() waited for the meta store's
write queue to drain as its "async write completed" barrier. But the async
worker dequeues an operation *before* it issues the rocksdb Put, so an empty
queue only proves the write is in flight, not that it is readable. If
run_leak_cleanup() runs inside that window, approximate_entry_count() (which
iterates rocksdb only, by design) sees zero metadata blocks and skips the
cleanup entirely -- remove_orphan_and_tmp_files then finds its orphan and tmp
files still on disk.
The window is a few statements wide and never fired in per-file CI builds;
the unity-batched IO objects shifted thread timing on the ASAN pipeline and
hit it on the first round. Poll the store itself (get() reads only rocksdb,
the same source approximate_entry_count() counts) instead of the queue size.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gdfkk7RqgD5e3Uv7bTM3NV1 parent 0838a27 commit 0b34063
1 file changed
Lines changed: 4 additions & 2 deletions
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
| |||
0 commit comments