zmuxuny opened a new pull request, #4542:
URL: https://github.com/apache/rocketmq-dashboard/pull/4542

   ### Which Issue(s) This PR Fixes
   
   - Fixes #4541
   
   ### Brief Description
   
   Apache Consumer Group settings update previously read, modified, and wrote 
each master Broker sequentially. If an earlier Broker read succeeded, Studio 
mutated it immediately; a later missing/unavailable Broker config could then 
fail the request after the earlier master had already changed.
   
   The regular `updateConsumerGroup` path already avoids this failure mode by 
reading every Broker configuration before any write. This change gives 
`updateConsumerGroupSettings` the same two-phase safety boundary: pre-read all 
current configs into a deterministic map, fail with zero writes if any 
preflight read fails, then apply the partial settings update only after the 
full preflight succeeds.
   ### Red / Green Verification
   
   Baseline: `master@d50ffecc9d7e8f8f46da64198831bd7952e6974e`.
   
   Fail-before, Java 21:
   - Two master Brokers; the first settings read succeeds and the second throws 
`broker unavailable`.
   - `RocketMQAdminClientImplTest`: **65 tests, exactly 1 failure**.
   - Mockito recorded one `createAndUpdateSubscriptionGroupConfig` call before 
the later read failed, proving the current path can partially mutate the 
cluster.
   
   Green, Java 21:
   - `RocketMQAdminClientImplTest`: **66/66 passed**, including both later-read 
exception and later-missing-config zero-write coverage.
   - 
`RocketMQAdminClientImplTest,MetadataServiceTest,ConsumerGroupControllerTest`: 
**139/139 passed**.
   - Checkstyle: **0 violations**.
   - `mvn -B -ntp -DskipTests package`: **BUILD SUCCESS**.
   - `git diff --check`: clean.
   ### Compatibility / Risk
   
   No API schema, frontend, dependency, permission, or field-mapping changes. 
Omitted settings still preserve each Broker's current value, and existing 
success audit/metadata behavior remains unchanged.
   
   This does not make the distributed write phase transactional: a network 
failure during the actual write loop can still leave a partial update, and the 
existing audit records `updated X/N brokers before failure`. The fix 
specifically guarantees that preflight read/missing-config failures occur 
before any mutation.
   
   AI-assisted source audit, implementation and regression authoring; the 
existing regular Consumer Group pre-read contract was used as the behavioral 
reference.


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