add comments for flushCommitIndex func