little-cui commented on a change in pull request #258: SCB-269 remove lock for
dependency handle
URL:
https://github.com/apache/incubator-servicecomb-service-center/pull/258#discussion_r164013461
##########
File path: server/infra/registry/registry.go
##########
@@ -229,9 +229,9 @@ func WithNoCache() PluginOpOption { return
func(op *PluginOp) { op.Mo
func WithWatchCallback(f WatchCallback) PluginOpOption {
return func(op *PluginOp) { op.WatchCallback = f }
}
-func WithStrKey(key string) PluginOpOption { return WithKey([]byte(key)) }
-func WithStrEndKey(key string) PluginOpOption { return
WithEndKey([]byte(key)) }
-func WithStrValue(value string) PluginOpOption { return
WithValue([]byte(value)) }
+func WithStrKey(key string) PluginOpOption { return
WithKey(util.StringToBytesWithNoCopy(key)) }
+func WithStrEndKey(key string) PluginOpOption { return
WithEndKey(util.StringToBytesWithNoCopy(key)) }
+func WithStrValue(value string) PluginOpOption { return
WithValue(util.StringToBytesWithNoCopy(value)) }
Review comment:
It will cause the template memory reuse error.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services