slime-io/slime

The dubbo service's dependencies are not being updated correctly

believening opened this issue · 0 comments

If only the consumer changed, we didn't build the event

callModel := convertDubboCallModel(se, convertedSe.InboundEndPoints)
if oldSem, exist := interfaceSeCache.Get(serviceKey); !exist {
interfaceSeCache.Set(serviceKey, newSeWithMeta)
ev, err := buildServiceEntryEvent(event.Added, newSeWithMeta.ServiceEntry, newSeWithMeta.Meta, callModel)
if err == nil {
log.Infof("add zk se, hosts: %s, ep size: %d ", newSeWithMeta.ServiceEntry.Hosts[0], len(newSeWithMeta.ServiceEntry.Endpoints))
for _, h := range s.handlers {
h.Handle(ev)
}
}
monitoring.RecordServiceEntryCreation(SourceName, err == nil)
} else {
if oldSem.Equals(*newSeWithMeta) {
continue
}
interfaceSeCache.Set(serviceKey, newSeWithMeta)
ev, err := buildServiceEntryEvent(event.Updated, newSeWithMeta.ServiceEntry, newSeWithMeta.Meta, callModel)
if err == nil {
log.Infof("update zk se, hosts: %s, ep size: %d ", newSeWithMeta.ServiceEntry.Hosts[0], len(newSeWithMeta.ServiceEntry.Endpoints))
for _, h := range s.handlers {
h.Handle(ev)
}
}
monitoring.RecordServiceEntryUpdate(SourceName, err == nil)
}