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

   ### Which Issue(s) This PR Fixes
   
   - Fixes #4537
   
   ### Brief Description
   
   Apache topic update previously continued when its instance/cluster-scoped 
`RmqTopic` lookup returned no metadata row. It then derived fallback 
queue/permission values and called `MQAdminExt.createAndUpdateTopicConfig` on 
the cluster masters.
   
   RocketMQ implements that SDK call with `UPDATE_AND_CREATE_TOPIC`, so an 
UPDATE request for a missing/stale topic could create the topic on the Broker. 
Because Studio's metadata row was still absent, the new Broker resource was not 
persisted into the same Studio inventory.
   
   This change fails closed with 404 immediately after the existing scoped 
metadata lookup, before any default configuration calculation or Broker 
mutation.
   ### Red / Green Verification
   
   Baseline: `master@d50ffecc9d7e8f8f46da64198831bd7952e6974e`.
   
   Fail-before, Java 21:
   - Added a regression with no instance-scoped metadata row for 
`missing-topic`.
   - `RocketMQAdminClientImplTest`: **65 tests, exactly 1 failure**.
   - The new test failed with `Expecting code to raise a throwable`, proving 
current master proceeded instead of returning 404.
   
   Green, Java 21:
   - `RocketMQAdminClientImplTest`: **65/65 passed**.
   - `RocketMQAdminClientImplTest,MetadataServiceTest,TopicControllerTest`: 
**133/133 passed**.
   - Checkstyle: **0 violations**.
   - `mvn -B -ntp -DskipTests package`: **BUILD SUCCESS**.
   - `git diff --check`: clean.
   ### Compatibility / Risk
   
   No API schema, frontend, dependency, create-topic, or cloud-provider 
changes. Existing Apache topic updates still preserve queue counts, permission, 
type and remark semantics.
   
   Two create-then-update test fixtures were corrected to return the metadata 
row that `createTopic` persists before the subsequent update; production create 
behavior was not changed.
   
   AI-assisted source/protocol audit, implementation and regression authoring; 
RocketMQ's `UPDATE_AND_CREATE_TOPIC` transport semantics and the red/green 
behavior were verified locally.


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