@Override
    public void delExpiredSegments(final StringBuilder sb) {
        // delete expired segment
        for (Segment segment : segmentList.get()) {
            if (segment == null) {
                continue;
            }
            if (!segment.needDelete()) {
                break;
            }
            delete(segment);
            segment.deleteFile();
        }
    }
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