* Fix this test randomly failing when running into async translog persistence edge case and failing to successfully close index * Also, slightly improve debug logging on close failure * Closes #44681
This commit is contained in:
parent
9338fc8536
commit
818103ff1e
|
@ -442,7 +442,7 @@ public class MetaDataIndexStateService {
|
|||
final boolean acknowledged = result.getValue().hasFailures() == false;
|
||||
try {
|
||||
if (acknowledged == false) {
|
||||
logger.debug("verification of shards before closing {} failed", index);
|
||||
logger.debug("verification of shards before closing {} failed [{}]", index, result);
|
||||
continue;
|
||||
}
|
||||
final IndexMetaData indexMetaData = metadata.getSafe(index);
|
||||
|
|
|
@ -311,6 +311,8 @@ public abstract class ESBlobStoreRepositoryIntegTestCase extends ESIntegTestCase
|
|||
addRandomDocuments(indexName, extraDocCount);
|
||||
}
|
||||
|
||||
// Wait for green so the close does not fail in the edge case of coinciding with a shard recovery that hasn't fully synced yet
|
||||
ensureGreen();
|
||||
logger.info("--> close index {}", indexName);
|
||||
assertAcked(client().admin().indices().prepareClose(indexName));
|
||||
|
||||
|
|
Loading…
Reference in New Issue