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

   ## Problem
   
   `ClusterRepositoryImpl` returns new `ClusterVO` and list instances, but the 
broker, proxy, and NameServer elements inside those lists remain shared with 
the repository. Mutating a nested object from `findById` or `findAll` therefore 
changes later snapshots. `updateConfig` also stores the caller's mutable 
`ClusterConfigVO` directly, allowing post-update mutations to bypass the 
repository API.
   
   This is separate from #1528/#1531, which isolated only the configuration 
object returned by read snapshots.
   
   ## Proposed scope
   
   - Deep-copy broker, proxy, and NameServer elements when creating repository 
snapshots.
   - Copy the configuration passed to `updateConfig` before storing it.
   - Add focused regression tests for nested read mutation and update-input 
aliasing.
   
   ## Expected behavior
   
   Repository state should only change through repository operations; callers 
must not be able to mutate it through objects passed into or returned from the 
repository.


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