slime-io / slime

An intelligent ServiceMesh manager based on Istio
https://slime-io.github.io/
Other
424 stars 78 forks source link

meshreg: notify update only if config actually changes #366

Closed believening closed 1 year ago

believening commented 1 year ago

Fix the issue where ServiceEntryWithMeta is always judged as not deep-equal, because the new one always has a new timestamp.

https://github.com/slime-io/slime/blob/67380da4891d76f031130eac92b80d95dd0e1a29/staging/src/slime.io/slime/modules/meshregistry/pkg/source/zookeeper/source.go#L450-L463

YonkaFang commented 1 year ago

优化思路: 参考sidecarWithMeta,对ServiceEntryWithMeta单独定义equals方法替代原来的反射比较,同时该方法中,对于meta的比较只考虑 labels、annotations。 这样就回避了”只有version发生变化“带来的不必要变更触发。

YonkaFang commented 1 year ago

优化思路: 参考sidecarWithMeta,对ServiceEntryWithMeta单独定义equals方法替代原来的反射比较,同时该方法中,对于meta的比较只考虑 labels、annotations。 这样就回避了”只有version发生变化“带来的不必要变更触发。

而其他source没有比较meta,所以暂无此问题。