-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Reindex wait_for_completion=false task failure #50248
Comments
Edited the title to clarify, minimal reproduction with empty index but happens with docs too. |
It looks like the creation of the .tasks index fails due to an issue with the mapping. It might be a leftover of the type removal but I am surprised that it's not caught by tests. @romseygeek can you take a look ? |
Pinging @elastic/es-distributed (:Distributed/Reindex) |
The inbuilt tasks mapping still has a top-level type of |
Thanks @romseygeek - we're happy to help test the fix to help unblock some downstream teams since we're currently pinning Kibana to a previous snapshot. |
This is a combination of two problems, the |
The built-in mapping for the tasks result index still has a mapping type defined; while this does not matter for index creation, as we still have a create method that takes a top-level type, it does matter for updates. In combination with a separate bug, that the built-in mapping has not incremented its meta version, this meant that tasks submitted to a cluster with an already existing task index would attempt to update the mappings on that index, and fail due to the top-level type. This commit fixes the mapping to have a top-level mapping of _doc, and also updates the meta version so that we do not update mappings on every new task. It also adds a test that explicitly runs two asynchronous tasks to ensure that the mappings do not cause a failure. Fixes #50248
Elasticsearch was pinned to an older version due to a migrations failure. Root cause was determined to be upstream and tracked at elastic/elasticsearch#50248. Now that a fix is merged we can see where the most recent snapshot leaves us.
The built-in mapping for the tasks result index still has a mapping type defined; while this does not matter for index creation, as we still have a create method that takes a top-level type, it does matter for updates. In combination with a separate bug, that the built-in mapping has not incremented its meta version, this meant that tasks submitted to a cluster with an already existing task index would attempt to update the mappings on that index, and fail due to the top-level type. This commit fixes the mapping to have a top-level mapping of _doc, and also updates the meta version so that we do not update mappings on every new task. It also adds a test that explicitly runs two asynchronous tasks to ensure that the mappings do not cause a failure. Fixes elastic#50248
Error log
The response code is 200 with a task id. When attempting to retrieve the returned task id:
Re-indexing fails until the .tasks index is deleted, and then I can run it once before it starts failing again.
The text was updated successfully, but these errors were encountered: