mirror of
https://github.com/alibaba/higress.git
synced 2026-03-08 10:40:48 +08:00
fix the delete service issue in nacos registry (#553)
This commit is contained in:
@@ -122,8 +122,8 @@ func (s *store) DeleteServiceEntryWrapper(service string) {
|
||||
|
||||
if data, exist := s.sew[service]; exist {
|
||||
s.toBeDeleted = append(s.toBeDeleted, data)
|
||||
s.deferedDelete[service] = struct{}{}
|
||||
}
|
||||
s.deferedDelete[service] = struct{}{}
|
||||
}
|
||||
|
||||
// should only be called when reconcile is done
|
||||
|
||||
@@ -484,7 +484,7 @@ func (w *watcher) Stop() {
|
||||
}
|
||||
|
||||
// clean the cache
|
||||
suffix := strings.Join([]string{s[0], w.NacosNamespace, w.Type}, common.DotSeparator)
|
||||
suffix := strings.Join([]string{s[0], w.NacosNamespace, "nacos"}, common.DotSeparator)
|
||||
suffix = strings.ReplaceAll(suffix, common.Underscore, common.Hyphen)
|
||||
host := strings.Join([]string{s[1], suffix}, common.DotSeparator)
|
||||
w.cache.DeleteServiceEntryWrapper(host)
|
||||
|
||||
Reference in New Issue
Block a user