{"action":"closed","issue":{"url":"https://api.github.com/repos/couchbase/sync_gateway/issues/2550","repository_url":"https://api.github.com/repos/couchbase/sync_gateway","labels_url":"https://api.github.com/repos/couchbase/sync_gateway/issues/2550/labels{/name}","comments_url":"https://api.github.com/repos/couchbase/sync_gateway/issues/2550/comments","events_url":"https://api.github.com/repos/couchbase/sync_gateway/issues/2550/events","html_url":"https://github.com/couchbase/sync_gateway/issues/2550","id":227846144,"number":2550,"title":"Expire checkpoints older than the metadata purge interval","user":{"login":"adamcfraser","id":8866453,"avatar_url":"https://avatars0.githubusercontent.com/u/8866453?v=3","gravatar_id":"","url":"https://api.github.com/users/adamcfraser","html_url":"https://github.com/adamcfraser","followers_url":"https://api.github.com/users/adamcfraser/followers","following_url":"https://api.github.com/users/adamcfraser/following{/other_user}","gists_url":"https://api.github.com/users/adamcfraser/gists{/gist_id}","starred_url":"https://api.github.com/users/adamcfraser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamcfraser/subscriptions","organizations_url":"https://api.github.com/users/adamcfraser/orgs","repos_url":"https://api.github.com/users/adamcfraser/repos","events_url":"https://api.github.com/users/adamcfraser/events{/privacy}","received_events_url":"https://api.github.com/users/adamcfraser/received_events","type":"User","site_admin":false},"labels":[{"id":108421991,"url":"https://api.github.com/repos/couchbase/sync_gateway/labels/backlog","name":"backlog","color":"ededed","default":false},{"id":110668780,"url":"https://api.github.com/repos/couchbase/sync_gateway/labels/P1:%20high","name":"P1: high","color":"b60205","default":false}],"state":"closed","locked":false,"assignee":{"login":"adamcfraser","id":8866453,"avatar_url":"https://avatars0.githubusercontent.com/u/8866453?v=3","gravatar_id":"","url":"https://api.github.com/users/adamcfraser","html_url":"https://github.com/adamcfraser","followers_url":"https://api.github.com/users/adamcfraser/followers","following_url":"https://api.github.com/users/adamcfraser/following{/other_user}","gists_url":"https://api.github.com/users/adamcfraser/gists{/gist_id}","starred_url":"https://api.github.com/users/adamcfraser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamcfraser/subscriptions","organizations_url":"https://api.github.com/users/adamcfraser/orgs","repos_url":"https://api.github.com/users/adamcfraser/repos","events_url":"https://api.github.com/users/adamcfraser/events{/privacy}","received_events_url":"https://api.github.com/users/adamcfraser/received_events","type":"User","site_admin":false},"assignees":[{"login":"adamcfraser","id":8866453,"avatar_url":"https://avatars0.githubusercontent.com/u/8866453?v=3","gravatar_id":"","url":"https://api.github.com/users/adamcfraser","html_url":"https://github.com/adamcfraser","followers_url":"https://api.github.com/users/adamcfraser/followers","following_url":"https://api.github.com/users/adamcfraser/following{/other_user}","gists_url":"https://api.github.com/users/adamcfraser/gists{/gist_id}","starred_url":"https://api.github.com/users/adamcfraser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamcfraser/subscriptions","organizations_url":"https://api.github.com/users/adamcfraser/orgs","repos_url":"https://api.github.com/users/adamcfraser/repos","events_url":"https://api.github.com/users/adamcfraser/events{/privacy}","received_events_url":"https://api.github.com/users/adamcfraser/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/couchbase/sync_gateway/milestones/24","html_url":"https://github.com/couchbase/sync_gateway/milestone/24","labels_url":"https://api.github.com/repos/couchbase/sync_gateway/milestones/24/labels","id":2420585,"number":24,"title":"1.5.0","description":"","creator":{"login":"djpongh","id":21346920,"avatar_url":"https://avatars0.githubusercontent.com/u/21346920?v=3","gravatar_id":"","url":"https://api.github.com/users/djpongh","html_url":"https://github.com/djpongh","followers_url":"https://api.github.com/users/djpongh/followers","following_url":"https://api.github.com/users/djpongh/following{/other_user}","gists_url":"https://api.github.com/users/djpongh/gists{/gist_id}","starred_url":"https://api.github.com/users/djpongh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djpongh/subscriptions","organizations_url":"https://api.github.com/users/djpongh/orgs","repos_url":"https://api.github.com/users/djpongh/repos","events_url":"https://api.github.com/users/djpongh/events{/privacy}","received_events_url":"https://api.github.com/users/djpongh/received_events","type":"User","site_admin":false},"open_issues":45,"closed_issues":21,"state":"open","created_at":"2017-03-29T22:31:04Z","updated_at":"2017-06-07T21:26:54Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2017-05-11T00:25:18Z","updated_at":"2017-06-07T21:26:54Z","closed_at":"2017-06-07T21:26:54Z","body":"After convergence, tombstones will be purged based on the server's Metadata Purge Interval.  To ensure that clients don't miss delete notifications that happened while they were offline, Sync Gateway should expire replication checkpoints that haven't been referenced for the length of the purge interval.  This will force clients that fail to replicate in that window to restart their replications from zero.\r\n \r\nTo accomplish this:\r\n- set an expiry based on the metadata purge interval when writing checkpoints\r\n- when retrieving checkpoints, do GetAndTouch to reset the expiry\r\n\r\nOne challenge will be to differentiate between replication checkpoints and other _local docs.  Need to review with @snej @pasin about how that might be done."}}
{"actor":{"display_login":"adamcfraser"}}