# About translog lastCommitted TranslogFileGeneration

**URL:** <https://discuss.elastic.co/t/about-translog-lastcommitted-translogfilegeneration/41883>\
**Category:** Elasticsearch\
**Created:** [February 16, 2016, 12:33pm UTC](https://discuss.elastic.co/t/about-translog-lastcommitted-translogfilegeneration/41883 "2016-02-16T12:33:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kewn21](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@kewn21](https://discuss.elastic.co/u/kewn21)\
**Post date:** [February 16, 2016, 12:33pm UTC](https://discuss.elastic.co/t/about-translog-lastcommitted-translogfilegeneration/41883/1 "2016-02-16T12:33:50Z")

</div>

The method commit() of Translog,which set lastCommittedTranslogFileGeneration to current.getGeneration(),why not set to current.getGeneration() -1 ?  
Because the field current was made to new TranslogWriter by createWriter(current.getGeneration() + 1) in method prepareCommit(),so that i think it should be setted to current.getGeneration() -1.

---

<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:** [July 5, 2017, 11:15pm UTC](https://discuss.elastic.co/t/about-translog-lastcommitted-translogfilegeneration/41883/2 "2017-07-05T23:15:53Z")

</div>

Closed on July 5, 2017, 11:15pm UTC


