Skip to content
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

Make CCR resilient against missing remote cluster connections #36682

Merged

Conversation

martijnvg
Copy link
Member

Both index following and auto following should be resilient against missing remote connections.
This happens in the case that they get accidentally removed by a user. When this happens
auto following and index following will retry to continue instead of failing with unrecoverable exceptions.

Both the put follow and put auto follow APIs validate whether the
remote cluster connection. The logic added in this change only exists
in case during the lifetime of a follower index or auto follow pattern
the remote connection gets removed. This retry behaviour similar how CCR
deals with authorization errors.

Closes #36667
Closes #36255

Both index following and auto following should be resilient against missing remote connections.
This happens in the case that they get accidentally removed by a user. When this happens
auto following and index following will retry to continue instead of failing with unrecoverable exceptions.

Both the put follow and put auto follow APIs validate whether the
remote cluster connection. The logic added in this change only exists
in case during the lifetime of a follower index or auto follow pattern
the remote connection gets removed. This retry behaviour similar how CCR
deals with authorization errors.

Closes elastic#36667
Closes elastic#36255
@martijnvg martijnvg added >bug v7.0.0 :Distributed/CCR Issues around the Cross Cluster State Replication features v6.6.0 labels Dec 16, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@martijnvg martijnvg changed the title Make CCR resilient against missingremote cluster connections Make CCR resilient against missing remote cluster connections Dec 17, 2018
@jasontedor jasontedor added v6.7.0 and removed v6.6.0 labels Dec 19, 2018
Copy link
Member

@jasontedor jasontedor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like that we have to compare exception message strings, but I can not think of a better solution. The only thing I can think of to avoid that is dedicated exceptions that extend IllegalArgumentException, but I am pretty unsure if we should do that. Feel free to consider this in a follow-up, or to completely reject it. LGTM.

Copy link
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and +1 to have a dedicated exception.

@martijnvg
Copy link
Member Author

I don't like that we have to compare exception message strings, but I can not think of a better solution. The only thing I can think of to avoid that is dedicated exceptions that extend IllegalArgumentException, but I am pretty unsure if we should do that.

I agree; throwing a dedicated exception is less fragile than comparing exception messages. I will address this in a follow up PR.

@martijnvg martijnvg merged commit 4fb62fc into elastic:master Dec 24, 2018
martijnvg added a commit that referenced this pull request Dec 24, 2018
Both index following and auto following should be resilient against missing remote connections.
This happens in the case that they get accidentally removed by a user. When this happens
auto following and index following will retry to continue instead of failing with unrecoverable exceptions.

Both the put follow and put auto follow APIs validate whether the
remote cluster connection. The logic added in this change only exists
in case during the lifetime of a follower index or auto follow pattern
the remote connection gets removed. This retry behavior similar how CCR
deals with authorization errors.

Closes #36667
Closes #36255
martijnvg added a commit that referenced this pull request Dec 24, 2018
Both index following and auto following should be resilient against missing remote connections.
This happens in the case that they get accidentally removed by a user. When this happens
auto following and index following will retry to continue instead of failing with unrecoverable exceptions.

Both the put follow and put auto follow APIs validate whether the
remote cluster connection. The logic added in this change only exists
in case during the lifetime of a follower index or auto follow pattern
the remote connection gets removed. This retry behavior similar how CCR
deals with authorization errors.

Closes #36667
Closes #36255
@martijnvg martijnvg added v6.6.0 and removed v6.7.0 labels Dec 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed/CCR Issues around the Cross Cluster State Replication features v6.6.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants