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

   ## What is the purpose of the change
   
   Three correctness fixes for the NameServer registry (the cluster address 
book the console probes):
   
   1. Names were not trimmed and had no unique constraint, so `prod` and `prod 
` (or two concurrent `prod` creates) could both be stored as near-duplicates 
(#2486).
   2. `namesrvAddr` was only checked for non-empty, so empty segments, missing 
ports, out-of-range ports and malformed IPv6 literals were accepted and only 
surfaced later as "offline" during probing (#2487).
   3. Update/delete ignored the affected-row count, so an entry deleted in 
between triggered an NPE/500 and two concurrent deletes could both report 
success (#2488).
   
   ## Brief changelog
   
   - `NameserverRegistryService` trims registry names at the boundary (blank is 
a 400) and maps unique-index violations to 409
   - reference DDL gains `UNIQUE KEY uk_nameserver_name (name)`; existing 
deployments apply the same key alongside this release
   - new `NamesrvAddrParser` accepts `host:port` / `[IPv6]:port` segments 
separated by commas or semicolons, rejects empty segments and ports outside 
1-65535, and stores the normalized value (trimmed, comma-joined, lowercased 
hosts) on create and update
   - update/delete now check the affected-row count and return 404 when the row 
has disappeared, instead of an opaque 500 or a false success
   
   ## How was this patch verified
   
   - server: `NamesrvAddrParserTest` 14, `NameserverRegistryServiceTest` 19, 
`NameServerControllerTest` 16 all green; full `mvn test` ran 1523 tests with 
only the 7 pre-existing environment failures in the CLI agent tests (missing 
`sh` binary on a Windows machine, identical on the clean base)
   
   Fixes #2486
   Fixes #2487
   Fixes #2488
   


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