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

Watches: Reset the index if it goes backwards #13

Open
jakubdyszkiewicz opened this issue Apr 23, 2019 · 0 comments
Open

Watches: Reset the index if it goes backwards #13

jakubdyszkiewicz opened this issue Apr 23, 2019 · 0 comments

Comments

@jakubdyszkiewicz
Copy link
Contributor

jakubdyszkiewicz commented Apr 23, 2019

According to the Consul docs https://www.consul.io/api/features/blocking.html

Reset the index if it goes backwards. While indexes in general are monotonically increasing(i.e. they should only ever increase as time passes), there are several real-world scenarios in which they can go backwards for a given query. Implementations must check to see if a returned index is lower than the previous value, and if it is, should reset index to 0 - effectively restarting their blocking loop. Failure to do so may cause the client to miss future updates for an unbounded time, or to use an invalid index value that causes no blocking and increases load on the servers. Cases where this can occur include:

  • If a raft snapshot is restored on the servers with older version of the data.
  • KV list operations where an item with the highest index is removed.
  • A Consul upgrade changes the way watches work to optimize them with more granular indexes.
mzawirski added a commit that referenced this issue Nov 24, 2022
mzawirski added a commit that referenced this issue Dec 2, 2022
mzawirski added a commit that referenced this issue Dec 5, 2022
mzawirski added a commit that referenced this issue Dec 5, 2022
mzawirski added a commit that referenced this issue Dec 6, 2022
* #13 | reset index if it goes backwards
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

1 participant