licon commented on issue #2339: URL: https://github.com/apache/dubbo-go/issues/2339#issuecomment-2017349621
我们在生产环境也遇到这个问题,希望能尽快解决 pprof list: ``` (pprof) list MergeURL Total: 489.08MB ROUTINE ======================== dubbo.apache.org/dubbo-go/v3/common.MergeURL in dubbo.apache.org/dubbo-go/[email protected]/common/url.go 271.67MB 324.67MB (flat, cum) 66.38% of Total . . 681:// the params of result will be (a1->v1, b1->v2, a2->v3). . . 682:// You should notice that the value of b1 is v2, not v4. . . 683:// due to URL is not thread-safe, so this method is not thread-safe . . 684:func MergeURL(serviceURL *URL, referenceURL *URL) *URL { . . 685: // After Clone, it is a new URL that there is no thread safe issue. . 52MB 686: mergedURL := serviceURL.Clone() . . 687: params := mergedURL.GetParams() . . 688: // iterator the referenceURL if serviceURL not have the key ,merge in . . 689: // referenceURL usually will not changed. so change RangeParams to GetParams to avoid the string value copy.// Group get group . . 690: for key, value := range referenceURL.GetParams() { . . 691: if v := mergedURL.GetParam(key, ""); len(v) == 0 { . . 692: if len(value) > 0 { 268.67MB 268.67MB 693: params[key] = value . . 694: } . . 695: } . . 696: } . . 697: . . 698: // loadBalance,cluster,retries strategy config . 1MB 699: methodConfigMergeFcn := mergeNormalParam(params, referenceURL, []string{constant.LoadbalanceKey, constant.ClusterKey, constant.RetriesKey, constant.TimeoutKey}) . . 700: ```  -- 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]
