private void doAllocateSegment() {
        LOG.info("SegmentAllocator is started.");
        while (!Thread.currentThread().isInterrupted()) {
            doAllocateSegmentInLock();
            doSwapOutSegments(false);
        }
        LOG.info("SegmentAllocator exit.");
    }
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