Skip to content

[CCR] Change APIs to align better with how CCR will be used #33931

Closed
@martijnvg

Description

@martijnvg

The names of the current CCR APIs don't match well with what they are doing and the use cases CCR needs to support.

Based on what ccr does and the use cases it needs support there is a need for the following primitives:

  1. Create the follow index based on settings and the mapping in the leader index.
  2. Start fetching of write operations from leader and replicate into follow index.
  3. Stop the fetching of write operations from the leader and replication into follow index.
  4. Transform a follow index into a normal index. After this step it cannot become a follower index.

It should be possible to stop and than start following a leader index with the same follow index, so that parameters that control certain characteristics of the persistent tasks following leader shards can be changed to improve replication throughput.

Currently there are the following APIs:

  • create and follow api, which does 1 and 2.
  • follow api, which does 2.
  • unfollow api, which does 3.

The follow changes should be made in order to better align CCR with the supported use cases:

  1. Rename the following apis:
  • follow api > start api (/{index}/_ccr/follow > /{index}/_ccr/start)
  • unfollow api > stop api (/{index}/_ccr/unfollow > /{index}/_ccr/stop)
  1. Add a new api, named the unfollow api, that changes a follower index into a regular index, so that it can handle regular write operations. This API will require the follow index to be closed. It will remove the index.xpack.ccr.following_index setting and ccr custom index metadata in the IndexMetaData of the follow index. After this; when the index is opened then it will not longer use the FollowingEngine.

Metadata

Metadata

Assignees

Labels

:Distributed Indexing/CCRIssues around the Cross Cluster State Replication features

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions