@Override
    public void deleteFile() {
        this.closed.set(true);
        try {
            if (this.channel.isOpen()) {
                if (this.mutable) {
                    flush(true);
                }
                this.channel.close();
            }
            this.randFile.close();
        } catch (Throwable e1) {
            if (e1 instanceof IOException) {
                ServiceStatusHolder.addReadIOErrCnt();
                BrokerSrvStatsHolder.incDiskIOExcCnt();
            }
            logger.error("[File Store] failure to close channel ", e1);
        }
        try {
            logger.info(new StringBuilder(512)
                    .append("[File Store] delete file ")
                    .append(file.getAbsoluteFile()).toString());
            this.file.delete();
        } catch (Throwable ee) {
            if (ee instanceof IOException) {
                ServiceStatusHolder.addReadIOErrCnt();
                BrokerSrvStatsHolder.incDiskIOExcCnt();
            }
            logger.error("[File Store] failure to delete file ", 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