-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Fix test for half-deleted 6x indices import #67587
Conversation
Reenabled and fixed test that verifies that we properly cleanup after 6x leftover data.
Pinging @elastic/es-distributed (Team:Distributed) |
There was a problem hiding this 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))) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, fixed in f0e72e2
@elasticmachine update branch |
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.
Reenabled and fixed test that verifies that we properly cleanup after
6x leftover data.