test_pg_chaos: Check a recovered object only while nothing is in flight on it #210

Open
koolkhel wants to merge 1 commits from koolkhel/vitastor:pg-chaos-busy-recover into master

View File

@@ -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;