zjncs opened a new pull request, #11132:
URL: https://github.com/apache/rocketmq/pull/11132

   ### Motivation
   
   The `-c` option of `mqadmin checkRocksdbCqWriteProgress` was only used for 
an existence check, while the request loop afterwards walked the whole 
`brokerAddrTable`, so the check request was fired at brokers of every cluster — 
not just the requested one. Brokers whose master was down resolved to a null 
address, which `defaultMQAdminExtImpl` silently routed through the name server 
channel.
   
   ### Modifications
   
   Iterate the brokers of the requested cluster only, and skip brokers without 
a master.
   
   ### Verification
   
   Fail-before (new test, run against the unpatched code):
   
   ```
   CheckRocksdbCqWriteProgressCommandTest#testCheckOnlySpecifiedCluster
   java.lang.RuntimeException: CheckRocksdbCqWriteProgressCommand command failed
     at 
CheckRocksdbCqWriteProgressCommand.execute(CheckRocksdbCqWriteProgressCommand.java:99)
   (check request hit a master-less broker outside the requested cluster)
   ```
   
   Pass-after:
   
   ```
   Tests run: 2, Failures: 0, Errors: 0, Skipped: 0 -- 
CheckRocksdbCqWriteProgressCommandTest
   ```
   


-- 
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]

Reply via email to