@Override
    public void append(final Segment segment) {
        while (true) {
            final Segment[] curr = segmentList.get();
            final Segment[] update = new Segment[curr.length + 1];
            System.arraycopy(curr, 0, update, 0, curr.length);
            update[curr.length] = segment;
            if (segmentList.compareAndSet(curr, update)) {
                return;
            }
        }
    }
Return segment by the given offset.

@param offset     the position to search
@return           the segment included the position
@throws IOException  the exception while searching
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/disk/FileSegmentList.java