You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yx9o (via GitHub)" <gi...@apache.org> on 2026/10/16 13:37:25 UTC

[PR] fix(nameserver): apply registry replacements atomically [rocketmq-dashboard]

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

   ### Brief Description
   
   Replacing a NameServer registry entry currently performs an `updateById` followed by a separate statement that clears omitted optional fields. If another replacement completes between those statements, the first request can clear the second request's namespace, K8s ID, or description, leaving a record that matches neither submitted replacement.
   
   Write the name, normalized address, and all three optional fields in one ID-scoped `UPDATE`, including explicit null values. Remove the separate clearing method. Preserve name/address validation, duplicate-name conflicts, affected-row checks, and the stored-row reload. No API or schema changes are required.
   
   Add an H2-backed regression using the real MyBatis mapper: another replacement completes after the first statement commits, and its complete record must survive. Also cover a replacement that mixes populated and cleared optional fields, and update the existing validation/error-path tests for the single-statement update.
   
   ### How Did You Test This Change?
   
   Using JDK 22.0.2 with the project's Java 21 compilation target:
   
   ```bash
   mvn -f server/pom.xml -B -ntp '-Dtest=NameserverRegistry*Test,NamesrvAddrParserTest,NameServer*Test' test
   git diff --check
   ```
   
   - 79 tests passed, with zero failures, errors, or skips. Maven compiled production and test sources, and Checkstyle reported zero violations.
   - Before the production fix, the two new persistence tests ran with one failure: the competing replacement's namespace was unexpectedly null. Both pass with the fix.
   - Independent source review found no actionable issues.
   
   The persistence regression uses deterministic statement interleaving against H2 in MySQL mode. The full backend suite and concurrent live MySQL requests were not run.
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits (`fix:`)
   - [x] Tests added or updated for non-trivial changes, test methods named `...Test`
   - [x] New UI text has both Chinese and English entries under `web/src/i18n/` — not applicable; no UI text changes
   - [ ] Architecture constraints stay green (`mvn test` runs the ArchUnit checks) — full suite not run; the focused suite above passed
   - [x] New source files carry the ASF license header
   - [x] Documentation touched where behaviour changed — not applicable; the existing replacement contract is preserved
   


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(nameserver): apply registry replacements atomically [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6884:
URL: https://github.com/apache/rocketmq-dashboard/pull/6884#issuecomment-6377382157

   This pull request has been automatically closed because there has been no activity for 7 days. If you would like to continue working on this, please reopen the PR with updated changes.


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(nameserver): apply registry replacements atomically [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #6884: fix(nameserver): apply registry replacements atomically
URL: https://github.com/apache/rocketmq-dashboard/pull/6884


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org