Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3924,10 +3924,7 @@ protected void commitIndexWriter(final IndexWriter writer, final Translog transl
Loggers.addAppender(LogManager.getLogger(Engine.class), mockLogAppender);

// Issue the first flushOnIdle request. The flush happens in the background using the flush threadpool.
shard.flushOnIdle(0);
assertFalse(shard.isActive());

// Wait for log message that flush acquired lock immediately
// Then wait for log message that flush acquired lock immediately
mockLogAppender.addExpectation(
new MockLogAppender.SeenEventExpectation(
"should see first flush getting lock immediately",
Expand All @@ -3936,6 +3933,8 @@ protected void commitIndexWriter(final IndexWriter writer, final Translog transl
"acquired flush lock immediately"
)
);
shard.flushOnIdle(0);
assertFalse(shard.isActive());
assertBusy(mockLogAppender::assertAllExpectationsMatched);

// While the first flush is happening, index one more doc (to turn the shard's active flag to true),
Expand Down