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

[CCR] Report error if auto follower tries auto follow a leader index with soft deletes disabled #36886

Merged

Conversation

Projects
None yet
4 participants
@martijnvg
Copy link
Member

commented Dec 20, 2018

Currently if a leader index with soft deletes disabled is auto followed then this index is silently ignored.
This commit changes this behaviour to mark these indices as auto followed and report an error, which is
visible in auto follow stats. Marking the index as auto follow is important, because otherwise the auto follower will continuously try to auto follow and fail.

Relates to #33007

[CCR] Report error if auto follower tries auto follow a leader index …
…with soft deletes disabled

Currently if a leader index with soft deletes disabled is auto followed then this index is silently ignored.
This commit changes this behaviour to mark these indices as auto followed and report an error, which is
visible in auto follow stats. Marking the index as auto follow is important, because otherwise the auto follower
will continuously try to auto follow and fail.

Relates to #33007
@elasticmachine

This comment has been minimized.

Copy link

commented Dec 20, 2018

@jasontedor
Copy link
Member

left a comment

Thanks for picking this up. Looks good, but I left one comment. Assuming that you address, there is no need for another round.

if (leaderIndexSettings.getAsBoolean(IndexSettings.INDEX_SOFT_DELETES_SETTING.getKey(),
IndexMetaData.SETTING_INDEX_VERSION_CREATED.get(leaderIndexSettings).onOrAfter(Version.V_7_0_0)) == false) {

String message = LoggerMessageFormat.format(

This comment has been minimized.

Copy link
@jasontedor

jasontedor Dec 20, 2018

Member

I think a plain old String#format can be used here, and then we can avoid adding yet another use of this class (which I ultimately want to remove).

martijnvg added some commits Dec 20, 2018

@martijnvg martijnvg merged commit b42074c into elastic:master Dec 20, 2018

7 checks passed

CLA Commit author is a member of Elasticsearch
Details
elasticsearch-ci-1 Build finished.
Details
elasticsearch-ci-2 Build finished.
Details
elasticsearch-ci/default-distro Build finished.
Details
elasticsearch-ci/docbldesx Build finished.
Details
elasticsearch-ci/oss-distro-docs Build finished.
Details
elasticsearch-ci/packaging-sample Build finished.
Details

martijnvg added a commit that referenced this pull request Dec 20, 2018

[CCR] Report error if auto follower tries auto follow a leader index …
…with soft deletes disabled (#36886)

Currently if a leader index with soft deletes disabled is auto followed then this index is silently ignored.
This commit changes this behavior to mark these indices as auto followed and report an error, which is visible in auto follow stats. Marking the index as auto follow is important, because otherwise the auto follower will continuously try to auto follow and fail.

Relates to #33007

martijnvg added a commit that referenced this pull request Dec 20, 2018

[CCR] Report error if auto follower tries auto follow a leader index …
…with soft deletes disabled (#36886)

Currently if a leader index with soft deletes disabled is auto followed then this index is silently ignored.
This commit changes this behavior to mark these indices as auto followed and report an error, which is visible in auto follow stats. Marking the index as auto follow is important, because otherwise the auto follower will continuously try to auto follow and fail.

Relates to #33007

@martijnvg martijnvg referenced this pull request Dec 24, 2018

Closed

[CCR] Auto follow patterns #33007

10 of 10 tasks complete

@jimczi jimczi added v7.0.0-beta1 and removed v7.0.0 labels Feb 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.