Implications of deleting a non existing document (By document ID)

Hello,
Is there any Implications of deleting a non existing document?
What happens when a DELETE call by document id arrives to a node and no such document id?
for example DELETE /index/type/12345
especially i'm talking about version 2.3.3. but also if the behaviour changes on newer versions like 6+.

Thanks

The ID is checked for existence on the primary shard, and then an error is returned.

I wonder if there is another question hidden behind this initial question. Maybe you can elaborate.

--Alex

Thank you @spinscale for your answer.
I'm asking this because I have some process which deletes a document by ID from an index. and the developer wanted to make sure the document does not exists on other indices as well, so it sends delete request to all other indices without knowing if they have such documentId or not.
Our cluster now suffers from very long GC's, so i started investigating our query logs, and saw those deletes on non existing documents.

Thats the reason for my question. I wanted to understand the consequences of such deletions on the node/cluster (except the usage of a connection). how can it impact the cluster? does such requests saves anything on memory? also in cases of thousands delete requests in few minutes?

My gut feeling here is, that long GCs might be the cause of something else, as checking the existence of a an id is a relatively fast operation, where you deal with short lived objects. The main question here is probably, about how many of those requests are we talking about? Do you keep creating new TCP connections for those or reuse existing ones.

You can use node stats to get a bit of more overview of your memory consumption/cleanup, maybe you can spot some offenders right away and figure out where this is coming from.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.