Hi, I was reading https://discuss.elastic.co/t/question-on-read-consistency/14232/10
ElasticSearch can I reach GET consistency cross replicas (for same client, client does set then get)?
Please correct me if i'm wrong but it looks to me like i can reach "consistency" meaning I will always get the latest value written even if my read gets to a replica which did not get my last write if:
- I use
action.get.realtime: true
(which is default). - when I do write I use param
replication: sync
(which is also default).
And in this case even if i wrote a value to a master, and then immediately read it with a client on any replica on any situation, i will always get my latest get because:
-
action.get.realtime: true
makes sure I read fromtransactionlog
if value is not already store. but this is only per ashard
- If i reach any other replica shard then the fact that I used
replication:sync
which is also default means that when I did the write i got success only when finished the writing. so any replica shard will return to me the last value.
so in that manner a GET after PUT is always consistent and not just eventual consistent.
is that correct??