Disable versioning completely


I'm trying to find a way to disable version control completely, because frequent version lookups (term dictionary lookup + numeric docvalue lookup) have a huge impact on performance in my case (see Significant overhead of concurrency control for small docs). My case is overwriting (NOT read-modify-update) many small documents. I know, I can't disable versioning without patching the code, it's ok.

I can guarantee that updates to the same document are fed into ES without concurrency. And, afaik by default ES replication reports success to the caller synchronously. But now I'm starting to think that even this two facts are not enough to prevent race conditions.
I could imagine situation where I made request to index version 1 of a document, it reached ES, but worker thread was preempted for a long time for some reason. Meanwhile, client which sent the request received network exception and reissued the request, successfully indexing version 1 of the document. Then, version 2 was indexed over. And then preempted thread finally was scheduled, and now it's trying to index version 1. In this case with disabled version control I got race condition. Such scenario looks really rare, but I don't think it can't be ignored.

My question is the following: are there ways which will allow patch the code and completely disable versioning (e.g. by providing some tweaks in feeding logic and/or ES settings) in case of document overwriting without introducing race conditions?

I'm using ES 5.4.

Thanks in advance!

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