Some confusion about translog

Hello everyone,I have known that "index.translog.durability" make the data from page cache fsync to translog file,but what is the mechanism about fsync the data from page cache to segment file?Is it controlled by OS not Elasticsearch?If it so,will it happen that data have been put into the translog but not segment?

The index translog durability setting determines how frequently the translog is fsynced to disk and will therefore affect durability. The refresh interval index setting and the refresh commend controld how frequently the translog is written into segments that can be searched.

Thx for the reply!I know the "refresh" commend make data from "index buffer" can write to page cache,but I would like to know what control the frequent the data is fsynced from page cache to segment file?

The page cache is managed by the operating system based on file access and not by Elasticsearch. I therefore am not sure I understand your question.

I think I got what i would to know!thx u!!

For the sake of other readers, if you are thinking about durability then you need only consider the translog. When Elasticsearch is restarted it will rebuild any missing segment files using information from the translog.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.