# Some confusion about translog

**URL:** <https://discuss.elastic.co/t/some-confusion-about-translog/195592>\
**Category:** Elasticsearch\
**Created:** [August 17, 2019, 10:11am UTC](https://discuss.elastic.co/t/some-confusion-about-translog/195592 "2019-08-17T10:11:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![KellyK313](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@KellyK313](https://discuss.elastic.co/u/KellyK313)\
**Post date:** [August 17, 2019, 10:11am UTC](https://discuss.elastic.co/t/some-confusion-about-translog/195592/1 "2019-08-17T10:11:25Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [August 17, 2019, 10:55am UTC](https://discuss.elastic.co/t/some-confusion-about-translog/195592/2 "2019-08-17T10:55:09Z")

</div>

The index translog durability setting determines how frequently the translog is fsynced to disk and will therefore affect durability. The [refresh interval index setting](https://www.elastic.co/guide/en/elasticsearch/reference/7.3/docs-refresh.html) and the refresh commend controld how frequently the translog is written into segments that can be searched.

---

<div class="post-metadata">

**Author:** ![KellyK313](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@KellyK313](https://discuss.elastic.co/u/KellyK313)\
**Post date:** [August 17, 2019, 1:03pm UTC](https://discuss.elastic.co/t/some-confusion-about-translog/195592/4 "2019-08-17T13:03:27Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [August 17, 2019, 2:37pm UTC](https://discuss.elastic.co/t/some-confusion-about-translog/195592/5 "2019-08-17T14:37:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![KellyK313](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@KellyK313](https://discuss.elastic.co/u/KellyK313)\
**Post date:** [August 17, 2019, 4:44pm UTC](https://discuss.elastic.co/t/some-confusion-about-translog/195592/7 "2019-08-17T16:44:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [August 26, 2019, 2:05pm UTC](https://discuss.elastic.co/t/some-confusion-about-translog/195592/8 "2019-08-26T14:05:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 23, 2019, 2:05pm UTC](https://discuss.elastic.co/t/some-confusion-about-translog/195592/9 "2019-09-23T14:05:33Z")

</div>

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