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

   `ClusterRepositoryImpl` exposed the cached `ClusterVO` objects directly from 
`findAll()`/`findById()`, so a caller could mutate the shared cache, and 
`updateConfig` mutated the stored object in two separate writes that concurrent 
readers could observe in between.
   
   - `findAll()`/`findById()` now return defensive copies (nested lists are 
copied with `new ArrayList` so even immutable sources produce a fresh list).
   - `updateConfig` replaces the stored cluster atomically via 
`computeIfPresent`, so readers never see a partially updated snapshot.
   - Added a unit test asserting the returned copy is independent.
   


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