-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Fix testProcessMultipleChunks #125304
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 testProcessMultipleChunks #125304
Conversation
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
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
| projectId, | ||
| namespace, | ||
| reservedStateChunks.getFirst().metadata().version(), | ||
| reservedStateChunks.isEmpty() ? null : reservedStateChunks.getFirst().metadata().version(), |
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.
I think we should use EMPTY_VERSION?
elasticsearch/server/src/main/java/org/elasticsearch/cluster/metadata/ReservedStateMetadata.java
Line 51 in eceb178
| public static final Long EMPTY_VERSION = -1L; // use -1 as sentinel for empty metadata |
* Fix testProcessMultipleChunks
This test is supposed to test a successful process of multiple reserved state chunks but the random chunk generation sometimes produced an empty list of chunks, so the processing failed (as expected). This caught a different error though, that I've corrected in this PR + fixed the test code.