{"action":"created","issue":{"url":"https://api.github.com/repos/coreos/etcd/issues/2047","labels_url":"https://api.github.com/repos/coreos/etcd/issues/2047/labels{/name}","comments_url":"https://api.github.com/repos/coreos/etcd/issues/2047/comments","events_url":"https://api.github.com/repos/coreos/etcd/issues/2047/events","html_url":"https://github.com/coreos/etcd/issues/2047","id":53561942,"number":2047,"title":"Auto-increment watch index?","user":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-06T20:54:59Z","updated_at":"2015-01-06T21:44:18Z","closed_at":null,"body":"Supose client Alice watches /key1 at index 5, and then 1000 unrelated changes happen to /key2. As I understand it, Alice will get a 401 window expired error.\r\n\r\nI have not looked at etcd's code, so maybe this question is hopelessly naive. But I wonder if it would be possible for etcd to increment the watch's index for every unrelated change it sees. That is, the code that checks \"Did this watch at index 5 fire?\" when it sees change 6, should increment the 5 to a 6. This would allow clients to re-get and re-watch much less often.\r\n\r\nClients of course have to be able to re-get and re-watch to be correct, but minimizing how often they have to do it seems important.\r\n\r\n(Original inspiration: https://github.com/GoogleCloudPlatform/kubernetes/pull/3235)"},"comment":{"url":"https://api.github.com/repos/coreos/etcd/issues/comments/68939357","html_url":"https://github.com/coreos/etcd/issues/2047#issuecomment-68939357","issue_url":"https://api.github.com/repos/coreos/etcd/issues/2047","id":68939357,"user":{"login":"xiang90","id":4479947,"avatar_url":"https://avatars.githubusercontent.com/u/4479947?v=3","gravatar_id":"","url":"https://api.github.com/users/xiang90","html_url":"https://github.com/xiang90","followers_url":"https://api.github.com/users/xiang90/followers","following_url":"https://api.github.com/users/xiang90/following{/other_user}","gists_url":"https://api.github.com/users/xiang90/gists{/gist_id}","starred_url":"https://api.github.com/users/xiang90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiang90/subscriptions","organizations_url":"https://api.github.com/users/xiang90/orgs","repos_url":"https://api.github.com/users/xiang90/repos","events_url":"https://api.github.com/users/xiang90/events{/privacy}","received_events_url":"https://api.github.com/users/xiang90/received_events","type":"User","site_admin":false},"created_at":"2015-01-06T21:44:18Z","updated_at":"2015-01-06T21:44:18Z","body":"@lavalamp Also please note\r\n>Supose client Alice watches /key1 at index 5, and then 1000 unrelated changes happen to /key2. As I understand it, Alice will get a 401 window expired error.\r\n\r\nThis will not trigger a 401. Only when you do the re-watch at index 5, there will be a 401."}}