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

   ## Problem
   
   `ClusterTopology.addNode` inserts a node into `nodeMap` before checking its 
type. Unknown types therefore create ghost map entries that are absent from 
every typed node list. A null type also mutates the map before the subsequent 
switch throws.
   
   This leaves `nodeMap`, the typed lists, and `getTotalNodeCount()` 
inconsistent after a rejected input.
   
   ## Expected behavior
   
   `addNode` should reject null and unsupported node types before changing any 
topology state. The three supported types (`NAMESRV`, `BROKER`, and `PROXY`) 
should keep their existing routing behavior.
   
   ## Proposed approach
   
   Validate the node type at the method boundary, then construct and insert the 
node only after validation succeeds. Add focused tests for all supported types 
and for atomic rejection of null/unknown values.
   
   I searched issues and pull requests across all states for 
`ClusterTopology.addNode`, unsupported node types, and ghost topology nodes. I 
did not find an existing implementation.
   


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