Some questions about ES Optimistic Concurrency

  1. concurrent update without specify version will cause update override, right?
  2. will Optimistic Concurrency will guranett override never happen if we use version, right?
  3. if 2 is true, then in code, each time to update a doc, a lock will be used before get version of a document and update it, right?
  1. I think you mean "overwrite" rather than "override", but yes.
  2. Yes.
  3. I'm not sure if you mean a lock in the client code or in the server code, but regardless the answer is no. Optimistic concurrency control via the version field does not require locks anywhere.

I wrote about optimistic concurrency control in Elasticsearch; whilst the examples relate to using NEST, the .NET Elasticsearch client, the overview is applicable to Elasticsearch in general.

thanks, man. it's very helpful