@Override
    public void close() {
        if (this.closed.compareAndSet(false, true)) {
            try {
                if (this.channel.isOpen()) {
                    if (this.mutable) {
                        flush(true);
                    }
                    this.channel.close();
                }
                this.randFile.close();
            } catch (Throwable ee) {
                if (ee instanceof IOException) {
                    ServiceStatusHolder.addReadIOErrCnt();
                    BrokerSrvStatsHolder.incDiskIOExcCnt();
                }
                logger.error(new StringBuilder(512).append("[File Store] Close ")
                        .append(this.file.getAbsoluteFile().toString())
                        .append("'s ").append(segmentType).append(" file failure").toString(), ee);
            }
        }
    }
Segment file. Topic contains multi FileSegments. Each FileSegment contains data file and index file.
It is mini particle of topic expire policy. It will be marked deleted when expired.
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/disk/FileSegment.java