Aias00 opened a new issue, #7229:
URL: https://github.com/apache/rocketmq-dashboard/issues/7229

   ### Before Creating the Bug Report
   - [x] Searched existing issues and PRs, including #4274 and merged #4466 
(clearing optional fields), and #6506 (auditing). No existing report covers 
failed replacement atomicity.
   - [x] This is a Studio defect on the current development branch.
   
   ### Studio Version
   `rocketmq-studio` at `127c47b06a268cc74224d5f34c56ec7c36ac0d55`, built from 
source.
   
   ### Runtime Environment
   macOS, JDK 21; H2 dev datasource for fault-injection reproduction. No 
browser or live broker required.
   
   ### Connected RocketMQ Cluster
   Not required; local NameServer registry persistence only.
   
   ### Describe the Bug
   `NameserverRegistryService.update` writes non-null fields with `updateById`, 
then clears omitted optional columns in a second UPDATE. Neither the service 
method nor its controller has a transaction. A failure while clearing optional 
columns reports a failed edit, but the first statement has already committed 
the new name/address, leaving the entry partly replaced.
   
   ### Steps to Reproduce
   1. Persist a registry row with an old name/address and K8s namespace, K8s ID 
and description.
   2. Update the name/address while omitting the optional fields, as the edit 
dialog does when they are cleared.
   3. Inject a database error in the second mapper update that clears nullable 
columns.
   4. Inspect the persisted row after the service throws.
   
   ### What Did You Expect to See?
   A failed logical edit leaves the whole entry unchanged. Successful edits 
still write new required values and clear omitted optional columns together.
   
   ### What Did You See Instead?
   The new name/address remain committed while old optional values remain, 
despite the edit being reported as failed.
   
   ### Additional Context
   Wrap the existing replacement operation in a transaction and verify through 
the Spring-managed service and real database that a second-write failure rolls 
back the first write. This requires no API or DTO change.
   
   ### Are You Willing to Submit a Pull Request?
   - [x] Yes
   


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