I need to sync a RDBS data with Elasticsearch. The common approach to achieve this is applying changes on the RDBS and then to use a message queue (or a table used to ETL) t
Short answer:
You don't need a refresh. It will be consistent means operations are executed in order. ES makes sure always latest request succeeds. And it makes the changes persistent every index/update/delete
request.
In case, there are two write requests received at different network partition for an ID and later one succeeds first, then earlier one will not be updated as consistency is achieved by versioning. Latest version data always succeeds.
Long answer:
You need to look at many concepts like translog
, fsync
, consistency at ES, 'optimistic concurrency control', versioning, partitioning, availability
.
ES achieves consistency using versioning. So when you sent index/update/delete
requests it does the following things at high level.
index/delete/update
operationThere are many concepts/algorithms in this to make it powerful distributed system.