Skip to content

Fix delete- and update-by-query on indices without sequence numbers #50077

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 3 commits into from
Dec 11, 2019

Conversation

ywelsch
Copy link
Contributor

@ywelsch ywelsch commented Dec 11, 2019

This fixes a bug where delete-by-query and update-by-query were not working on an older index that did not have sequence numbers yet. The reason is that in a mixed-version 6.x/5.x cluster, documents can have a primary term but miss a sequence number.

After upgrade, this resulted in exceptions of the form:

{
    "error": {
        "root_cause": [
            {
                "type": "action_request_validation_exception",
                "reason": "Validation Failed: 1: ifSeqNo is unassigned, but primary term is [1];"
            }
        ],
        "type": "action_request_validation_exception",
        "reason": "Validation Failed: 1: ifSeqNo is unassigned, but primary term is [1];"
    },
    "status": 400
}

@ywelsch ywelsch added >bug :Distributed Indexing/Reindex Issues relating to reindex that are not caused by issues further down v6.8.6 labels Dec 11, 2019
@elasticmachine
Copy link
Collaborator

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

Copy link
Contributor

@henningandersen henningandersen left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Member

@dnhatn dnhatn 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 Yannick.

@ywelsch ywelsch merged commit 5157076 into elastic:6.8 Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed Indexing/Reindex Issues relating to reindex that are not caused by issues further down v6.8.6
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants