Skip to content

Commit

Permalink
fix the delete service issue in nacos registry (alibaba#553)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnlanni authored Sep 27, 2023
1 parent 4e392d1 commit d8c34bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion registry/memory/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion registry/nacos/v2/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d8c34bb

Please sign in to comment.