Skip to content

Commit

Permalink
Get all futures in test_concurrent_append_flush
Browse files Browse the repository at this point in the history
In test_concurrent_append_flush, which is a fuzzer style test,
we now get() all futures returned by flush calls during the fuzz
portion, instead of only the last flush.

It is possible in some cases for prior futures to be unavailable
even after the last future has resolved which caused occasional
CI failures. See 13035 for more analysis.

Fixes redpanda-data#13035.
  • Loading branch information
travisdowns committed Dec 11, 2023
1 parent 9602442 commit 222b8df
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/v/storage/tests/log_segment_appender_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,17 @@ static void run_concurrent_append_flush(
last_append->get();
}

// append a final flush, so we are in a known flushed state for the
// following checks
futs.emplace_back(appender.flush());

for (auto& f : futs) {
// get all the flush futures
// whp these are all available except possibly the last one
// (appended above) but this is not actually guaranteed, see
// redpanda#13035
f.get();
}
auto sa_state = fmt::format("{}", appender);

// now there should be nothing in-flight
Expand Down

0 comments on commit 222b8df

Please sign in to comment.