Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky test IndexShardTests.testCommitLevelRestoreShardFromRemoteStore #14418

Merged
merged 1 commit into from
Jun 18, 2024
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 @@ -2956,6 +2956,14 @@ public void testRestoreShardFromRemoteStore(boolean performFlush) throws IOExcep
)
);

// Make sure to drain refreshes from the shard. Otherwise, if the refresh is in-progress, it overlaps with
// deletion of segment files in the subsequent code block.
for (ReferenceManager.RefreshListener refreshListener : target.getEngine().config().getInternalRefreshListener()) {
if (refreshListener instanceof ReleasableRetryableRefreshListener) {
((ReleasableRetryableRefreshListener) refreshListener).drainRefreshes();
}
}

sachinpkale marked this conversation as resolved.
Show resolved Hide resolved
// Delete files in store directory to restore from remote directory
Directory storeDirectory = target.store().directory();

Expand Down
Loading