[CCR] Change AutofollowCoordinator to use wait_for_metadata_version#36264
Merged
martijnvg merged 4 commits intoelastic:masterfrom Dec 12, 2018
Merged
Conversation
Changed AutofollowCoordinator makes use of the wait_for_metadata_version feature in cluster state API and removed hard coded poll interval. Originates from elastic#35895 Relates to elastic#33007
Collaborator
|
Pinging @elastic/es-distributed |
…r_metadata_version
jasontedor
approved these changes
Dec 12, 2018
Member
jasontedor
left a comment
There was a problem hiding this comment.
LGTM. Sorry for some nits.
| onFailure, | ||
| leaderClusterState -> { | ||
| IndexMetaData leaderIndexMetaData = leaderClusterState.getMetaData().index(leaderIndex); | ||
| remoteClusterStateRsp -> { |
Member
There was a problem hiding this comment.
I guess “Rsp is Response? Sorry to be a nit, can we spell it out?
Member
Author
There was a problem hiding this comment.
This was my attempt to keep line length at bay. I will change it.
| request, | ||
| e -> handler.accept(null, e), | ||
| leaderClusterState -> handler.accept(leaderClusterState, null)); | ||
| remoteClusterStateRsp -> handler.accept(remoteClusterStateRsp, null)); |
Member
There was a problem hiding this comment.
Same comment here about spelling out to Response.
|
|
||
| getLeaderClusterState(remoteCluster, (leaderClusterState, e) -> { | ||
| if (leaderClusterState != null) { | ||
| getRemoteClusterState(remoteCluster, metadataVersion + 1, (leaderClusterStateRsp, e) -> { |
Member
There was a problem hiding this comment.
And of course same comment to spell out.
Member
Author
There was a problem hiding this comment.
#36408 already changes this method, so when I merge in master after that pr is merged it should be good.
10 tasks
…r_metadata_version
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.
Changed AutofollowCoordinator makes use of the wait_for_metadata_version
feature in cluster state API and removed hard coded poll interval.
Originates from #35895
Relates to #33007