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

Add Pause/Resume Auto Follower APIs #47904

Merged
merged 1 commit into from
Oct 13, 2019
Merged

Conversation

tlrx
Copy link
Member

@tlrx tlrx commented Oct 11, 2019

Backport of #47510 for 7.x

@tlrx tlrx added :Distributed/CCR Issues around the Cross Cluster State Replication features backport v7.5.0 labels Oct 11, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (:Distributed/CCR)

@tlrx
Copy link
Member Author

tlrx commented Oct 11, 2019

@elasticmachine run elasticsearch-ci/oss-distro-docs

This commit adds two APIs that allow to pause and resume
CCR auto-follower patterns:

// pause auto-follower
POST /_ccr/auto_follow/my_pattern/pause

// resume auto-follower
POST /_ccr/auto_follow/my_pattern/resume

The ability to pause and resume auto-follow patterns can be
useful in some situations, including the rolling upgrades of
cluster using a bi-directional cross-cluster replication scheme
(see elastic#46665).

This committ adds a new active flag to the AutoFollowPattern
and adapts the AutoCoordinator and AutoFollower classes so
that it stops to fetch remote's cluster state when all auto-follow
patterns associate to the remote cluster are paused.

When an auto-follower is paused, remote indices that match the
pattern are just ignored: they are not added to the pattern's
followed indices uids list that is maintained in the local cluster
state. This way, when the auto-follow pattern is resumed the
indices created in the remote cluster in the meantime will be
picked up again and added as new following indices. Indices
created and then deleted in the remote cluster will be ignored
as they won't be seen at all by the auto-follower pattern at
resume time.

Backport of elastic#47510 for 7.x
@tlrx
Copy link
Member Author

tlrx commented Oct 12, 2019

@elasticmachine retest this please

tlrx added a commit to tlrx/elasticsearch that referenced this pull request Oct 12, 2019
tlrx added a commit that referenced this pull request Oct 13, 2019
This commit disables BWC tests for the backport of #47904 on 7.x
@tlrx tlrx merged commit 742fa81 into elastic:7.x Oct 13, 2019
@tlrx tlrx deleted the pause-auto-followers-7.x branch October 13, 2019 07:22
tlrx added a commit that referenced this pull request Oct 13, 2019
… API (#47971)

This commit reenables bwc tests and adapts the bwc serialization layer for #47904
howardhuanghua pushed a commit to TencentCloudES/elasticsearch that referenced this pull request Oct 14, 2019
This commit disables BWC tests for the backport of elastic#47904 on 7.x
howardhuanghua pushed a commit to TencentCloudES/elasticsearch that referenced this pull request Oct 14, 2019
… API (elastic#47971)

This commit reenables bwc tests and adapts the bwc serialization layer for elastic#47904
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :Distributed/CCR Issues around the Cross Cluster State Replication features v7.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants