From 6e35789812f45e39d7b045a81ff2d30f39e21af6 Mon Sep 17 00:00:00 2001 From: Yury Luneff Date: Mon, 30 Nov 2026 06:31:37 +0300 Subject: [PATCH] test_pg_chaos: Check a recovered object only while nothing is in flight on it flush_recover_pending() read an object as soon as the PG was active again, even while a write to it was still in flight. A read racing a write may return a mixture of the old and the new data when the store writes the new version in place under it (store v1 flush, the new store's compaction; see "Reads running parallel to flushes of the same clean block may read a mixture of old and new data" in v1/read.cpp), and check_recovered() then reported content no recorded version explains. Leave such objects pending: the convergence loop checks them after drain(), as it already does for repeated deletions. --- src/test/test_pg_chaos.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/test_pg_chaos.cpp b/src/test/test_pg_chaos.cpp index d0c448cc..20d92bbb 100644 --- a/src/test/test_pg_chaos.cpp +++ b/src/test/test_pg_chaos.cpp @@ -3894,7 +3894,9 @@ void chaos_t::flush_recover_pending() if (!pg_active()) return; int obj = *it; - if (check_recovered(obj, "an outage")) + // A read racing a write in flight may see part of it (flushed in place + // under the read), so check the object only once nothing is in flight + if (!busy[obj] && check_recovered(obj, "an outage")) it = recover_pending.erase(it); else ++it; -- 2.47.3