When request is forwared to replica in write?

I need to know operation sequence in below 2 cases

  1. if index.translog.durability=request then what would be sequence of operations? (option1 - data written to RAM for primary -> request forwarded to replica -> data persisted in translog or option2 - data written to RAM for primary -> data persisted in translog -> request forwarded to replica or option3 - data written to translog in primary -> request forwarded to replica (no write in memory))
  2. if index.translog.durability=async then what would be sequence of operations? (option1 - data written to RAM for primary -> request forwarded to replica or option2 - data written to RAM for primary -> data persisted in disk (after sync_interval) ---> request forwarded to replica)
  3. please also mention case if index.translog.durability=flush_threshold_size

I'm not sure you can observe the difference between any of the options you suggest. If the write is acked back to the client then it's written durably to the translog on all in-sync shard copies and will become visible on the next refresh. If it's not acked then the write may or may not take place at some future time.

The request is forwarded to the replica straight away.

That isn't a valid value for index.translog.durability.

1 Like