public Pair<Integer, Long> appendLogAsync(final long logIndex, final byte[] data) {
        final int waitToWroteSize = SegmentFile.getWriteBytes(data);
        final SegmentFile segmentFile = (SegmentFile) this.fileManager.getLastFile(logIndex, waitToWroteSize, true);
        if (segmentFile != null) {
            final int pos = segmentFile.appendData(logIndex, data);
            final long expectFlushPosition = segmentFile.getFileFromOffset() + pos + waitToWroteSize;
            return Pair.of(pos, expectFlushPosition);
        }
        return Pair.of(-1, (long) -1);
    }
Write the data and return it's wrote position.
@param data logEntry data
@return (wrotePosition, expectFlushPosition)
jraft-extension/java-log-storage-impl/src/main/java/com/alipay/sofa/jraft/storage/db/AbstractDB.java