@Override
    public Segment last() {
        final Segment[] curViews = segmentList.get();
        if (curViews.length == 0) {
            return null;
        }
        return curViews[curViews.length - 1];
    }
Check FileSegments whether is expired, close all expired FileSegments, and then delete these files.

@param sb   string buffer
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/disk/FileSegmentList.java