@Override
    protected void onReset(final long nextLogIndex) {
        List<SegmentFile> destroyedFiles = new ArrayList<>();
        this.writeLock.lock();
        try {
            this.checkpointFile.destroy();
            destroyedFiles.addAll(this.segments);
            this.segments.clear();
            LOG.info("Destroyed segments and checkpoint in path {} by resetting.", this.segmentsPath);
        } finally {
            this.writeLock.unlock();
            for (SegmentFile segFile : destroyedFiles) {
                segFile.destroy();
            }
        }
    }
It's wrote position is from start(HEADER_SIZE) but it's not the last file, SHOULD not happen.
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/log/RocksDBSegmentLogStorage.java