apache / rocketmq

Apache RocketMQ is a cloud native messaging and streaming platform, making it simple to build event-driven applications.
https://rocketmq.apache.org/
Apache License 2.0
21.29k stars 11.71k forks source link

[Enhancement] Modify file segment construct method #8976

Open lizhimins opened 2 days ago

lizhimins commented 2 days ago

Before Creating the Enhancement Request

Summary

Currently tiered storage module uses a singleton pattern to use thread pool. To better manage the thread pool's lifecycle within the fileSegment, it is necessary to modify the constructor of fileSegment. This is an internal implementation of the broker and will not affect client API.

当前分级存储模块使用单例方式使用线程池,为了更好的在 fileSegment 中使用线程池,管理线程池的生命周期,因此需要修改 fileSegment 的构造函数,这是一个 broker 内部实现,不会对用户产生影响

Motivation

To better manage the thread pool's lifecycle

Describe the Solution You'd Like

Modify the constructor of fileSegment

Describe Alternatives You've Considered

Modify the constructor of fileSegment

Additional Context

No response