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

   ### Which Issue(s) This PR Fixes
   
   - Fixes #11220
   
   ### Brief Description
   
   `reviveQueueNum` defines POP revive topology that is created once during 
broker construction: `AckMessageProcessor` allocates a fixed 
`PopReviveService[]`, and the revive system topic is initialized with that 
queue count. Request-time POP paths nevertheless read the live `BrokerConfig` 
value.
   
   Prevent runtime `UPDATE_BROKER_CONFIG` requests from changing 
`reviveQueueNum`, which could otherwise let new requests select queues without 
corresponding revive services. Also reject zero or negative startup values 
before POP and Peek paths evaluate modulo `reviveQueueNum`.
   
   ### How Did You Test This Change?
   
   Red-first on unmodified `develop`:
   
   - A real `UPDATE_BROKER_CONFIG` request changed `reviveQueueNum` from 8 to 9 
and returned `SUCCESS`; the new regression expected `NO_PERMISSION` and failed.
   
   After the fix:
   
   - `AdminBrokerProcessorTest#testUpdateBrokerConfigRejectsReviveQueueNum` 
passed.
   - `BrokerControllerTest#testRejectsNonPositiveReviveQueueNum` passed for 
zero and negative values.
   - Focused broker build: 2 tests passed, `BUILD SUCCESS`.
   - Checkstyle: 0 violations.
   
   Command:
   
   ```bash
   mvn -B -ntp -pl broker -am -DskipITs \
     
-Dtest=AdminBrokerProcessorTest#testUpdateBrokerConfigRejectsReviveQueueNum,BrokerControllerTest#testRejectsNonPositiveReviveQueueNum
 \
     -Dsurefire.failIfNoSpecifiedTests=false -Dspotbugs.skip=true test
   ```


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