@Override
            public void onSnapshotSave(SnapshotWriter writer, Closure done) {
                snapshots.add(new LogId(writer.getCurrentMeta().getLastIncludedIndex(), writer.getCurrentMeta()
                    .getLastIncludedTerm()));
                done.run(Status.OK());
            }
Test rollback stateMachine with readIndex for issue 317:
https://github.com/sofastack/sofa-jraft/issues/317
jraft-core/src/test/java/com/alipay/sofa/jraft/core/NodeTest.java