-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
[CCR] Added history uuid validation #33546
Merged
martijnvg
merged 20 commits into
elastic:master
from
martijnvg:ccr_validate_history_uuid
Sep 12, 2018
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
61c8ad9
[CCR] Added history uuid validation
martijnvg 624b416
renamed method
martijnvg 0ed85c5
added unit test
martijnvg 0685ee4
isolated logic that fetches history UUIDs and moved it to CcrLicenseC…
martijnvg 8293265
Merge remote-tracking branch 'es/master' into ccr_validate_history_uuid
martijnvg 96edbde
iter
martijnvg b9ae5ce
moved history uuid validation to internal shard changes api
martijnvg ee475a0
keep recorded index shard uuids as string[] around
martijnvg 9df2ac6
iter
martijnvg eb5f7cd
Merge remote-tracking branch 'es/master' into ccr_validate_history_uuid
martijnvg e7e0f14
fixed test after merge
martijnvg 43fbbee
iter
martijnvg 9620d7b
added test that verifies that we stop and fail the shard follow task
martijnvg 8fee5ba
fixed checkstyle violations and fixed error message assertions
martijnvg c2952b6
ignore replica shard stats
martijnvg 620505e
iter
martijnvg 600626e
Merge remote-tracking branch 'es/master' into ccr_validate_history_uuid
martijnvg 8beaa0a
Merge remote-tracking branch 'es/master' into ccr_validate_history_uuid
martijnvg 89829fa
reduce timeout
martijnvg 7fa9070
fixed checkstyle violation
martijnvg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
Martijn, I am sorry. I should have been clearer here:
If a commit stats is not null, it should have a valid history UUID. We can remove the null check
historyUUID == null
.If a primary is unassigned, the index_shard_stats of that primary is not returned in the response; thus we won't have a history UUID for that shardId in the array. I think we should check that every entry in the historyUUIDs array is not null; otherwise, we should fail the request. WDYT?
Please note the assertion
assert new HashSet<>(Arrays.asList(historyUUIDs)).size() == leaderIndexMetaData.getNumberOfShards();
does not guarantee that every entry is non-null.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.
Agreed
Good point. I will check each entry individually.