TSDB: Fix RollupActionSingleNodeTests failing with IndexNotFoundException#87333
Merged
csoulios merged 2 commits intoelastic:masterfrom Jun 3, 2022
Merged
TSDB: Fix RollupActionSingleNodeTests failing with IndexNotFoundException#87333csoulios merged 2 commits intoelastic:masterfrom
csoulios merged 2 commits intoelastic:masterfrom
Conversation
Collaborator
|
Pinging @elastic/es-analytics-geo (Team:Analytics) |
csoulios
commented
Jun 2, 2022
| // A duplicate event was created by random generator. We should not fail for this | ||
| // reason. | ||
| logger.info("We tried to insert a duplicate: " + response.getFailureMessage()); | ||
| logger.debug("We tried to insert a duplicate: [{}]", response.getFailureMessage()); |
Contributor
Author
There was a problem hiding this comment.
I am changing this to debug level so that it does not flood the logs
csoulios
commented
Jun 2, 2022
Comment on lines
+115
to
+116
| sourceIndex = randomAlphaOfLength(12).toLowerCase(Locale.ROOT); | ||
| rollupIndex = "rollup-" + sourceIndex + "-" + randomAlphaOfLength(4).toLowerCase(Locale.ROOT); |
Contributor
Author
There was a problem hiding this comment.
Making the source index 12 chars long make it extremely impossible to hit a conflict.
Also, changed the rollup index name so that it cannot conflict with source index name.
Bonus, it's easy to tell which index is the source and which is is the rollup index from the logs
Contributor
Author
There was a problem hiding this comment.
that's should work too, I guess
csoulios
commented
Jun 2, 2022
| * @return the name of the source index clone | ||
| */ | ||
| private String cloneSourceIndex(String sourceIndex) { | ||
| String sourceIndexClone = "clone-" + sourceIndex; |
Contributor
Author
There was a problem hiding this comment.
sourceIndexClone was an instance variable initialized at the test setup().
Now it's been generated here making it more explicit
csoulios
added a commit
to csoulios/elasticsearch
that referenced
this pull request
Jun 3, 2022
…tion (elastic#87333) Looks like the failure reported at elastic#69799 (comment) happens because of randomly generated index names conflict between two tests. Add more random numbers to test names, so that the probability of conflicts is negligible Generate source and rollup index names more carefully so that they are logged properly. Cleanup test code Fixes elastic#69799
Collaborator
💚 Backport successful
|
elasticsearchmachine
pushed a commit
that referenced
this pull request
Jun 3, 2022
…tion (#87333) (#87384) Looks like the failure reported at #69799 (comment) happens because of randomly generated index names conflict between two tests. Add more random numbers to test names, so that the probability of conflicts is negligible Generate source and rollup index names more carefully so that they are logged properly. Cleanup test code Fixes #69799
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Looks like the failure reported at #69799 (comment) happens because of randomly generated index names conflict between two tests.
Fixes #69799