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
Delete documents via delete_by_query if index.blocks.read_only_allow_delete is set to true #36114
Comments
Pinging @elastic/es-distributed |
It looks like |
As @nik9000 pointed out, allowing document deletion will not immediately make the index smaller, but can even temporarily make it larger. We should improve the error message and documentation here, however. I'm marking the issue as adoptme (for the docs/error message change). |
[doc issue triage] |
Under Dynamic index settings, the description for
After a bit of research, I propose the following changes:
Admittedly, I don't know what this other thing is. Should we invite users to review the General recommendations and possibly Tune for disk usage? @nik9000 and @ywelsch, I defer to your wisdom here. |
Thanks for picking this up @lockewritesdocs. There's two very distinct concepts here: deleting documents from an index, and deleting the index itself. Deleting documents from an index doesn't necessarily free up resources and may in fact consume additional resources, and is therefore not permitted when the read-only-allow-delete block is in place. Deleting the index itself does free up resources pretty much straight away, and is a sensible way to free up disk space and therefore release a read-only-allow-delete block. Delete-by-query is one way to delete documents from an index, and doesn't delete the index itself, so it's a special case of the above.. Therefore:
|
* Changes for issue #36114. * Adding stronger wording to the new note. * Removing statement about typically not needting to set the read-only allow delete block. * Replacing Elasticsearch with {es} variable.
Elasticsearch version (
bin/elasticsearch --version
): 6.5.1Plugins installed: []
JVM version (
java -version
): 1.8.0u191OS version (
uname -a
if on a Unix-like system): 4.4.0-128-genericDescription of the problem including expected versus actual behavior:
Elasticsearch does not allow to delete documents via delete_by_query api if
index.blocks.read_only_allow_delete
is set totrue
.The error is
I would expect that deletion via the delete_by_query api is allowed if
index.blocks.read_only_allow_delete
is set totrue
.Steps to reproduce:
index.blocks.read_only_allow_delete
totrue
delete_by_query
apiProvide logs (if relevant):
The text was updated successfully, but these errors were encountered: