andyhuangdev opened a new pull request, #11746: URL: https://github.com/apache/ozone/pull/11746
## What changes were proposed in this pull request? NodeStateMap.updateNode calls oldEntry.copyContainers(), which creates a new set, and the DatanodeEntry constructor copies that set again with addAll. This change passes the old DatanodeEntry directly to the constructor so the containers are copied once. It avoids an intermediate set allocation while preserving an independent container set for the new entry. Follow-up to the [review comment on #11687](https://github.com/apache/ozone/pull/11687#discussion_r4357379505). ## What is the link to the Apache JIRA [HDDS-17446](https://issues.apache.org/jira/browse/HDDS-17446) ## How was this patch tested? Passed TestSCMNodeManager#testRegisterKeepsContainersOnNodeUpdate, which verifies that containers are preserved when a datanode re-registers with a new version, ports, or IP address. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
