Confusion of elasticsearch

Hi , i am study the source of elk.
As all know, there are two types of write operation in elasticseasrch , sync and unsync.
I wonder. What does a sync operation really mean,
If i write a document to primary and its replica in sync model, the writing operation on replica will return success signel on which point.
The write operation record into translog ?
or the translog flush to lucene index?

Looking forward your reply

Hi,

The ability to specify async replication for indexing operations is deprecated and removed in version 2.0.0 (see https://github.com/elastic/elasticsearch/issues/10114 for reference). Indexing operations with sync will return after they have been written to disk to the translog and are also written to the lucene in-memory buffer on primary and all replica shards. For reference: https://www.elastic.co/guide/en/elasticsearch/guide/current/translog.html

Cheers

Thanks, Christoph
It helps me a lot to understand elk
Thanks