-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
/_aliases remove action ignores must_exist when alias is missing #94478
Comments
So
However, the same request with So it seems to be working as intended, but I agree the 404 is confusing when there is only one action and it's a |
Pinging @elastic/es-data-management (Team:Data Management) |
Changes behavior of removing as alias that does not exist, with must_exist argument set to false, or left as the default null. Previously returned 404 with AliasNotFoundException; now returns 200. Fixes elastic#94478
After some thought, I think we should continue to return 404 on removal on non-existing aliases if This is my reasoning:
|
This commit does the following: * When an alias action list succeeds partially a list of results for each action are returned. This will only occur is must_exist==false * Use same exception for removal of missing aliases whether must_exist is true or false. Closes elastic#94478
Elasticsearch Version
8.6.0
Installed Plugins
No response
Java Version
bundled
OS Version
Linux 5.19.0-35-generic #36-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 3 18:36:56 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Problem Description
If I try to perform a single "remove" action with "must_exist": false on the /_aliases endpoint, I still receive an HTTP 404 response with "type": "aliases_not_found_exception".
This seems to contradict documentation of the /aliases API
Steps to Reproduce
[ ] Create index new_index
[ ] Try to remove a missing some_alias on new_index index
[ ] This will lead to the following error:
Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered: