lizhimins opened a new issue, #7222: URL: https://github.com/apache/rocketmq/issues/7222
### Before Creating the Bug Report - [X] I found a bug, not just asking a question, which should be created in [GitHub Discussions](https://github.com/apache/rocketmq/discussions). - [X] I have searched the [GitHub Issues](https://github.com/apache/rocketmq/issues) and [GitHub Discussions](https://github.com/apache/rocketmq/discussions) of this repository and believe that this is not a duplicate. - [X] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ. ### Runtime platform environment Linux 4.19 ### RocketMQ version latest version in develop branch ### JDK Version JDK11 ### Describe the Bug The design logic of IndexFile in the current tiered storage system is confusion and there are some bugs, such as: - If the file that has been compacted is not successfully uploaded or still uploading, and the broker is restarted or crashes, the "current file" will not be initialized properly, resulting in the content of the file not being initialized to -1. - There are resource release issues, and the logic of resource release when compacting fails has not been considered. - The current design affects the main process of sending and receiving messages for building cq. - There are granularity issues with the locks. I will submit a bugfix for the current implementation and fix the ignored test cases. In the future, I hope to refactor the implementation of this IndexFile section. ### Steps to Reproduce None ### What Did You Expect to See? Resource not delete normally. ### What Did You See Instead? None ### Additional Context _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
