private boolean tryRecoverExistsFile(final SegmentFileOptions opts) {
        try {
            if (isBlank()) {
                // A blank segment, we don't need to recover.
                assert (!opts.recover);
                this.committedPos = this.wrotePos = HEADER_SIZE;
                BufferUtils.position(this.buffer, this.wrotePos);
                LOG.info("Segment file {} is blank, truncate it from {}.", this.path, HEADER_SIZE);
                clear(this.wrotePos, opts.sync);
            } else {
                if (opts.recover) {
                    if (!recover(opts)) {
                        return false;
                    }
                } else {
                    this.wrotePos = opts.pos;
                    BufferUtils.position(this.buffer, this.wrotePos);
                }
                assert (this.wrotePos == this.buffer.position());
                this.committedPos = this.wrotePos;
            }
            LOG.info("Loaded segment file {}, wrotePosition={}, bufferPosition={}, mappedSize={}.", this.path,
                this.wrotePos, this.buffer.position(), this.size);
        } catch (final Exception e) {
            LOG.error("Fail to load segment file {}.", this.path, e);
            return false;
        }
        return true;
    }
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