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

[test] Don't reuse index name as restored index #105450

Closed

Conversation

arteam
Copy link
Contributor

@arteam arteam commented Feb 13, 2024

Avoid conflicts with correct cleanup of shared folders

Resolve #105202

Avoid conflicts with correct cleanup of shared folders
@arteam arteam added :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >test Issues or PRs that are addressing/adding tests labels Feb 13, 2024
@arteam arteam marked this pull request as ready for review February 15, 2024 07:26
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@elasticsearchmachine elasticsearchmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Feb 15, 2024
@arteam arteam requested a review from tlrx February 15, 2024 07:27
@@ -98,7 +98,7 @@ public void testCreateAndRestoreSearchableSnapshot() throws Exception {
final String fsRepoName = randomAlphaOfLength(10);
final String indexName = randomAlphaOfLength(10).toLowerCase(Locale.ROOT);
final String aliasName = randomAlphaOfLength(10).toLowerCase(Locale.ROOT);
final String restoredIndexName = randomBoolean() ? indexName : randomAlphaOfLength(10).toLowerCase(Locale.ROOT);
final String restoredIndexName = randomAlphaOfLength(10).toLowerCase(Locale.ROOT);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it is valid to reuse the same name, since following closes or deletes original index before restore:

final boolean deletedBeforeMount = randomBoolean();
if (deletedBeforeMount) {
assertAcked(indicesAdmin().prepareDelete(indexName));
} else {
assertAcked(indicesAdmin().prepareClose(indexName));
}

@arteam
Copy link
Contributor Author

arteam commented Feb 21, 2024

@elasticmachine update branch

@arteam arteam closed this Feb 22, 2024
@arteam
Copy link
Contributor Author

arteam commented Feb 22, 2024

Superceded by #105731

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. >test Issues or PRs that are addressing/adding tests v8.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] SearchableSnapshotsIntegTests testCreateAndRestoreSearchableSnapshot failing
4 participants