The necessity of translog in the writing process of elasticSearch

What are the advantages of using the translog compared to simply setting a very low flush interval? If I set the flush interval to be very low, wouldn't that also achieve persistence? (I realize this might be a bit of a nitpicky question, but I'm curious about the difference.)

Flushing is a quite expensive operation, which can be seen in the guide for optmizing indexing speed where it is recommended to increase the refresh interval in order to gain indexing throughput. Writing to the transaction log has a lot less overhead. If there was no transaction log you would either end up with lack of persistence guarantees or very small segments, both which are very bad.

1 Like