diff --git a/src/test/osd_test.cpp b/src/test/osd_test.cpp index 3921c6ab..f19b3978 100644 --- a/src/test/osd_test.cpp +++ b/src/test/osd_test.cpp @@ -4707,7 +4707,8 @@ static void peer_without_and_with_osd1(ec_scheme_t ec, std::map of an EC PG, unstable. OSD 1 peers, flushes it and // loses its peers right after its own part is flushed. The others peer without it, and then it comes back. // When OSD 1 has stabilized its part, the others must not roll version 2 back: its stable part on OSD 1 -// would then make the object incomplete. While they hold pg_data_size parts of it, the PG must be active +// would then make the object incomplete. While they hold pg_data_size parts of it, the PG must be active, +// otherwise it must wait for OSD 1 void test_peering_flush_primary_lost(ec_scheme_t ec, int written) { printf("test_peering_flush_primary_lost[EC %d+%d, pg_minsize %d, v2 on %d]\n", ec.data, ec.parity, ec.pg_minsize, written); @@ -4723,7 +4724,7 @@ void test_peering_flush_primary_lost(ec_scheme_t ec, int written) bool active_without = false, complete = false; peer_without_and_with_osd1(ec, parts, history, active_without, complete); assert(complete); - assert(active_without || written == ec.data); + assert(active_without == (written > ec.data)); printf("test_peering_flush_primary_lost[EC %d+%d, pg_minsize %d, v2 on %d] passed\n", ec.data, ec.parity, ec.pg_minsize, written); } @@ -5709,6 +5710,7 @@ int main(int narg, char *args[]) test_peering_flush_primary_lost({ 3, 2, 4 }, 3); test_peering_flush_primary_lost({ 3, 2, 4 }, 4); test_peering_flush_primary_lost({ 3, 2, 4 }, 5); + test_peering_flush_primary_lost({ 8, 2, 9 }, 8); test_degraded_write_primary_lost({ 2, 1, 2 }); test_degraded_write_primary_lost({ 3, 2, 4 }); test_peering_flush_then_holder_lost({ 2, 1, 2 }, 2, 2);