Skip to content

Add data stream support to CCR #64525

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 2 commits into from
Nov 3, 2020
Merged

Conversation

martijnvg
Copy link
Member

Backport of #61993 to 7.x branch.

This commit adds support data stream support to CCR's auto following by making the following changes:

  • When the auto follow coordinator iterates over the candidate indices to follow,
    the auto follow coordinator also checks whether the index is part of a data stream and
    if the name of data stream also matches with the auto follow pattern then the index
    will be auto followed.
  • When following an index, the put follow api also checks whether that index is part
    of a data stream and if so then also replicates the data stream definition to the
    local cluster.
  • In order for the follow index api to determine whether an index is part of a data
    stream, the cluster state api was modified to also fetch the data stream definition
    of the cluster state if only the state is queried for specific indices.

When a data stream is auto followed, only new backing indices are auto followed.
This is in line with how time based indices patterns are replicated today. This
means that the data stream isn't copied 1 to 1 into the local cluster. The local
cluster's data stream definition contains the same name, timestamp field and
generation, but the list of backing indices may be different (depending on when
a data stream was auto followed).

Closes #56259

This commit adds support data stream support to CCR's auto following by making the following changes:
* When the auto follow coordinator iterates over the candidate indices to follow,
  the auto follow coordinator also checks whether the index is part of a data stream and
  if the name of data stream also matches with the auto follow pattern then the index
  will be auto followed.
* When following an index, the put follow api also checks whether that index is part
  of a data stream and if so then also replicates the data stream definition to the
  local cluster.
* In order for the follow index api to determine whether an index is part of a data
  stream, the cluster state api was modified to also fetch the data stream definition
  of the cluster state if only the state is queried for specific indices.

When a data stream is auto followed, only new backing indices are auto followed.
This is in line with how time based indices patterns are replicated today. This
means that the data stream isn't copied 1 to 1 into the local cluster. The local
cluster's data stream definition contains the same name, timestamp field and
generation, but the list of backing indices may be different (depending on when
a data stream was auto followed).

Closes elastic#56259
@martijnvg martijnvg added backport :Data Management/Data streams Data streams and their lifecycles labels Nov 3, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Data streams)

@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Nov 3, 2020
@martijnvg martijnvg merged commit 14bcf6f into elastic:7.x Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :Data Management/Data streams Data streams and their lifecycles Team:Data Management Meta label for data/management team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants