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

SD:Consul - Index handling is incorrect per consul docs #997

Closed
schmidtw opened this issue Jul 18, 2020 · 3 comments
Closed

SD:Consul - Index handling is incorrect per consul docs #997

schmidtw opened this issue Jul 18, 2020 · 3 comments

Comments

@schmidtw
Copy link
Contributor

The loop where index handling is incorrect.

Consul Docs
https://www.consul.io/api-docs/features/blocking#implementation-details

Index goes backwards

In rare cases, the index can be returned that is before the last index. In this case, the system can basically miss out on events for either a very long time or forever. This can be pretty damaging if you depend on the consistency of the SD value & the value does not appropriately update.

Index returned is zero

In rare cases the returned index can be zero. In this case the code should backoff and try again to avoid a tight loop.

@schmidtw
Copy link
Contributor Author

I have a proposed fix for these two errors in my local repo.
https://github.com/schmidtw/kit/commit/e539a98781cb06b55e5f787254627b720f21e8ff

@peterbourgon
Copy link
Member

Happy to take a PR.

@sagikazarmark
Copy link
Contributor

Fixed in #999

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

No branches or pull requests

3 participants