public void clear(final int startPos, final boolean sync) {
        this.writeLock.lock();
        try {
            if (startPos < 0 || startPos > this.size) {
                return;
            }
            final int endPos = Math.min(this.size, startPos + BLANK_HOLE_SIZE);
            for (int i = startPos; i < endPos; i++) {
                this.buffer.put(i, (byte) 0);
            }
            if (sync) {
                fsync(this.buffer);
            }
            LOG.info("Segment file {} cleared data in [{}, {}).", this.path, startPos, endPos);
        } finally {
            this.writeLock.unlock();
        }
    }
Clear data in [startPos, startPos+64).

@param startPos the start position(inclusive)
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/log/SegmentFile.java