neoLsH opened a new pull request, #11672: URL: https://github.com/apache/rocketmq/pull/11672
### Which Issue(s) This PR Fixes - Fixes #11652 ### Brief Description `TieredMessageStore#deleteTopics` destroys the tiered files and metadata of a deleted topic but leaves `MessageStoreFetcher`'s read-ahead cache untouched. Because the cache is keyed by `topic@queueId@offset`, a recreated topic can be served messages that were read before the deletion. This adds `MessageStoreFetcher#invalidateTopic` and clears the topic's cache entries while deleting the topic. ### How Did You Test This Change? - Added `MessageStoreFetcherImplTest#invalidateTopicTest`, covering removal and the `topic` / `topic2` prefix case. - Extended `TieredMessageStoreTest#testDeleteTopics` to seed the cache and assert deletion clears it. The assertion fails without the `invalidateTopic` call. - `mvn -pl tieredstore -Dtest=MessageStoreFetcherImplTest,TieredMessageStoreTest test` (19 tests, 0 failures) - `mvn -pl tieredstore -DskipTests validate` (project checkstyle: 0 violations) -- 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]
