写入内存buffer,同时写入translog
每隔5s,写入translog
replica shard 01
primary shard 01
fsync
trasnlog日志文件
es进程01
客户端
写入
机器01
数据refresh到os cache中,就能被搜索到;同时buffer清空
内存buffer
os cache
每隔1s,refresh到os cache
commit point
translog达到一定阈值,触发commit(flush),默认每隔30minflush1,将buffer中的数据强制refresh到buffer中去2,将os cache中的数据fsync强刷到segment file,写commit3.清空translog,重启一个新的translog
segment file