Skip to content
New issue

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

服务反注册不会触发 poll 返回 #29

Open
patricksuo opened this issue Jun 27, 2019 · 3 comments
Open

服务反注册不会触发 poll 返回 #29

patricksuo opened this issue Jun 27, 2019 · 3 comments

Comments

@patricksuo
Copy link
Contributor

patricksuo commented Jun 27, 2019

考虑有两个 discovery client,发生了这样的事件

  1. clientA.Register()
  2. clientB.Polls(ts = 0) => 返回 ts = 1
  3. clientB.Polls(ts = 1)
  4. clientA.Cancel()

第 4 步不会让 第 3 步的长轮询返回,第三步的 polls 要等到长轮询超时。

@patricksuo
Copy link
Contributor Author

patricksuo commented Jul 24, 2019

补充一下上面的描述:
有 A B 两类服务, B 依赖 A。在最后一个 A 下线时会出现这个问题。
因为 broadcast 时,服务 A 已经完全找不到了。

ii, err := r.Fetch(conn.arg.Zone, env, appid, 0, model.InstanceStatusUP) // TODO(felix): latesttime!=0 increase

此时这里尝试 Fetch A 的信息并广播会出错。

也许不是特别重要的问题。

@lintanghui
Copy link
Member

因为节点A已经不存在了,现在的处理逻辑是日志报错,然后等待下一次polls返回404

@langxiaoxia
Copy link

1.0.1版本没有这个问题, 会立即返回给poll空数据。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants