开始
IndexWriter.commit()
IndexWriter.prepareCommit()
是否存在
pendingCommit?
执行第一阶段提交
执行第二阶段提交
尝试段合并
结束
是
否