Transaction Log

又名 translog

为了保证存储在内存中的数据不丢失,ES的每个分片默认有一个 Transaction Log文件。

文档(document)index时,数据同时会写入Transaction Log中。

刷新(refresh)操作中,Index Buffer被清空,Transaction Log不会被清空。 在flush操作中,Transaction Log会被清空。

index.translog.durability可以设置 log 的写入方式,默认为reqeust,即每次请求都写入,另一选项为async,即异步写入,异步写入的时间间隔由index.translog.sync_interval参数配置,默认为5s