We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
考虑类似 nacos-sync 同步服务的场景,client 注册到 server 的 instances ip 可能不止一个且 ip 也各不相同,此时,这个 redo 逻辑就是错误的,粒度太大, 没考虑 cluster 以及 ip、端口号
func (c *ConnectionEventListener) CacheInstanceForRedo(serviceName, groupName string, instance model.Instance) { key := util.GetGroupName(serviceName, groupName) c.registeredInstanceCached.Set(key, instance) } func (c *ConnectionEventListener) CacheInstancesForRedo(serviceName, groupName string, instances []model.Instance) { key := util.GetGroupName(serviceName, groupName) c.registeredInstanceCached.Set(key, instances) } func (c *ConnectionEventListener) RemoveInstanceForRedo(serviceName, groupName string, instance model.Instance) { key := util.GetGroupName(serviceName, groupName) _, ok := c.registeredInstanceCached.Get(key) if !ok { return } c.registeredInstanceCached.Remove(key) } func (c *ConnectionEventListener) CacheSubscriberForRedo(fullServiceName, clusters string) { key := util.GetServiceCacheKey(fullServiceName, clusters) if !c.IsSubscriberCached(key) { c.subscribes.Set(key, struct{}{}) } }
建议至少将 CacheInstanceForRedo、CacheInstancesForRedo 的 key 改为:groupName@@serviceName@@cluster@@ip:port
The text was updated successfully, but these errors were encountered:
No branches or pull requests
考虑类似 nacos-sync 同步服务的场景,client 注册到 server 的 instances ip 可能不止一个且 ip 也各不相同,此时,这个 redo 逻辑就是错误的,粒度太大, 没考虑 cluster 以及 ip、端口号
建议至少将 CacheInstanceForRedo、CacheInstancesForRedo 的 key 改为:groupName@@serviceName@@cluster@@ip:port
The text was updated successfully, but these errors were encountered: