I am using an elastic search for search purpose. But recently I observer that some random error while adding data into elastic search. The error looks like:
version conflict, required seqNo [113789], primary term [19]. current document has seqNo [113797] and primary term [19]
The above type error comes randomly and I am not able to add/update data in elastic search. Can you please help to Understand :
What is the root cause of this issue?
How I can reproduce this issue? as this coming randomly need to know the basic step to reproduce this issue
What is the solution for this? How I can solve this issue?
Yes, we have indexing data into elastic search. we have cms in which user adding/updating/deleting documents and we are listening this events and adding data into elastic search.
We are using Mongo DB to fetch data in json format and then foramt it as per our elastic search mapping and add it into elastic search.
I suspect concurrently updating and deleting the same document by query might cause this. As far as I know both operations work based on a snapshot of the data as it was when the operation started, so if the operations take a long time and affect a large number of documents it is likely that version conflicts may be detected if multiple operations affect the same documents.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.