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 test for half-deleted 6x indices import #67587

Conversation

henningandersen
Copy link
Contributor

Reenabled and fixed test that verifies that we properly cleanup after
6x leftover data.

Reenabled and fixed test that verifies that we properly cleanup after
6x leftover data.
@henningandersen henningandersen added >test Issues or PRs that are addressing/adding tests :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. v8.0.0 v7.12.0 v7.11.1 labels Jan 15, 2021
@elasticmachine elasticmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Jan 15, 2021
@elasticmachine
Copy link
Collaborator

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

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

LGTM with one minor suggestion.


writeBrokenMeta(metaStateService -> {
for (final Path path : paths) {
try (Stream<Path> stateFiles = Files.list(path.resolve(MetadataStateFormat.STATE_DIR_NAME))) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Think you can just say IOUtils.rm(path.resolve(PersistedClusterStateService.METADATA_DIRECTORY_NAME)); since the MetaStateService#writeGlobalState() will create the directory again. Also preferring PersistedClusterStateService.METADATA_DIRECTORY_NAME over MetadataStateFormat.STATE_DIR_NAME to make it clear that we're wiping the Lucene-based metadata.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, fixed in f0e72e2

@henningandersen
Copy link
Contributor Author

@elasticmachine update branch

@henningandersen henningandersen merged commit 7bb676a into elastic:master Jan 18, 2021
henningandersen added a commit that referenced this pull request Jan 18, 2021
Reenabled and fixed test that verifies that we properly cleanup after
6x leftover data.
henningandersen added a commit that referenced this pull request Jan 18, 2021
Reenabled and fixed test that verifies that we properly cleanup after
6x leftover data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. >test Issues or PRs that are addressing/adding tests v7.11.1 v7.12.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants