ywxzm03 commented on code in PR #961:
URL: https://github.com/apache/dubbo-go-pixiu/pull/961#discussion_r3377496927
##########
pkg/server/cluster_manager.go:
##########
@@ -942,7 +952,7 @@ func (s *ClusterStore) DeleteEndpoint(clusterName string,
endpointID string) {
if e.ID == endpointID {
runtimeCluster.RemoveEndpoint(e)
clusterConfig.Endpoints =
append(clusterConfig.Endpoints[:i], clusterConfig.Endpoints[i+1:]...)
- s.prepareClusterConfig(clusterConfig)
+ s.prepareOwnedClusterConfig(clusterConfig)
Review Comment:
引入了slices.Delete来解决删除中间元素和结尾元素带来的内存泄露隐患,但需要最小go版本1.21,本项目版本为1.25.0;如果需要兼容老版本,也可以改为手写的slices.Delete
--
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]