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 @@ -58,6 +58,7 @@
import java.util.Collection;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.TimeUnit;

import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
Expand Down Expand Up @@ -327,8 +328,9 @@ public Settings onNodeStopped(String nodeName) throws Exception {
logger.info("--> verifying number of documents in index [{}]", restoredAgainIndex);
assertHitCount(client().prepareSearch(restoredAgainIndex).setSize(0).setTrackTotalHits(true).get(), numberOfDocs);

logger.info("--> deleting indices, maintenance service should clean up snapshot blob cache index");
logger.info("--> deleting indices, maintenance service should clean up [{}] docs in system index", numberOfCachedBlobs);
assertAcked(client().admin().indices().prepareDelete("restored-*"));

assertBusy(() -> {
refreshSystemIndex();
assertHitCount(
Expand All @@ -338,7 +340,7 @@ public Settings onNodeStopped(String nodeName) throws Exception {
.get(),
0L
);
});
}, 30L, TimeUnit.SECONDS);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, this might help, but can we perhaps log numberOfCachedBlobs before this assert busy such that we can see if it was trying to delete entries but was simply slow or if it did not even start on it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the numberOfCachedBlobs in the log message before deleting all remaining mounted indices.

}

private void checkNoBlobStoreAccess() {
Expand Down