private void doAllocateSegmentInLock() {
        this.allocateLock.lock();
        try {
            //TODO configure cap
            while (this.blankSegments.size() >= this.preAllocateSegmentCount) {
                this.fullCond.await();
            }
            doAllocateSegment0();
            this.emptyCond.signal();
        } catch (final InterruptedException e) {
            Thread.currentThread().interrupt();
        } catch (final IOException e) {
            this.blankSegments.add(new AllocatedResult(e));
            this.emptyCond.signal();
        } finally {
            this.allocateLock.unlock();
        }
    }
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