Skip to content

Register CcrRepository based on settings update (#36086) #36277

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

Merged
merged 10 commits into from
Dec 7, 2018

Conversation

Tim-Brooks
Copy link
Contributor

This commit adds an empty CcrRepository snapshot/restore repository.
When a new cluster is registered in the remote cluster settings, a new
CcrRepository is registered for that cluster.

This is implemented using a new concept of "internal repositories".
RepositoryPlugin now allows implementations to return factories for
"internal repositories". The "internal repositories" are different from
normal repositories in that they cannot be registered through the
external repository api. Additionally, "internal repositories" are local
to a node and are not stored in the cluster state.

The repository will be unregistered if the remote cluster is removed.

This commit adds an empty CcrRepository snapshot/restore repository.
When a new cluster is registered in the remote cluster settings, a new
CcrRepository is registered for that cluster.

This is implemented using a new concept of "internal repositories".
RepositoryPlugin now allows implementations to return factories for
"internal repositories". The "internal repositories" are different from
normal repositories in that they cannot be registered through the
external repository api. Additionally, "internal repositories" are local
to a node and are not stored in the cluster state.

The repository will be unregistered if the remote cluster is removed.
@Tim-Brooks Tim-Brooks added >non-issue :Distributed Indexing/CCR Issues around the Cross Cluster State Replication features v6.6.0 backport labels Dec 5, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@Tim-Brooks Tim-Brooks requested a review from ywelsch December 5, 2018 18:32
@Tim-Brooks
Copy link
Contributor Author

@ywelsch - This back port required some substantive changes due to modifications needed for the actions. Can you give it a review?

Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

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

If you subclass GenericAction instead, I think you can avoid the whole RequestBuilder stuff and the code will look pretty much like on master (and fields still final)

@Tim-Brooks Tim-Brooks requested a review from ywelsch December 6, 2018 18:53
@Tim-Brooks
Copy link
Contributor Author

If you subclass GenericAction instead, I think you can avoid the whole RequestBuilder stuff and the code will look pretty much like on master (and fields still final)

I have made these changes. Thanks for pointing out that base class. I have not done a lot of work related to back porting actions.

Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@Tim-Brooks Tim-Brooks merged commit ba8314c into elastic:6.x Dec 7, 2018
@Tim-Brooks Tim-Brooks deleted the backport_register_ccr_repo branch December 18, 2019 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :Distributed Indexing/CCR Issues around the Cross Cluster State Replication features >non-issue v6.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants