diff --git a/registry/directory/directory.go b/registry/directory/directory.go index 11687f82ee5fe0dba6f2bca38b6454ee9c666d91..0ef5023c619d27cc4dc1daf5129be0186b90e903 100644 --- a/registry/directory/directory.go +++ b/registry/directory/directory.go @@ -55,7 +55,6 @@ type registryDirectory struct { serviceType string registry registry.Registry cacheInvokersMap *sync.Map //use sync.map - //cacheInvokersMap map[string]protocol.Invoker Options } @@ -80,7 +79,7 @@ func NewRegistryDirectory(url *common.URL, registry registry.Registry, opts ...O }, nil } -//subscibe from registry +//subscribe from registry func (dir *registryDirectory) Subscribe(url common.URL) { for { if !dir.registry.IsAvailable() { @@ -115,16 +114,13 @@ func (dir *registryDirectory) Subscribe(url common.URL) { } } -//subscribe service from registry , and update the cacheServices +//subscribe service from registry, and update the cacheServices func (dir *registryDirectory) update(res *registry.ServiceEvent) { if res == nil { return } - logger.Debugf("registry update, result{%s}", res) - logger.Debugf("update service name: %s!", res.Service) - dir.refreshInvokers(res) } @@ -150,7 +146,6 @@ func (dir *registryDirectory) refreshInvokers(res *registry.ServiceEvent) { } func (dir *registryDirectory) toGroupInvokers() []protocol.Invoker { - newInvokersList := []protocol.Invoker{} groupInvokersMap := make(map[string][]protocol.Invoker) groupInvokersList := []protocol.Invoker{}