{"action":"created","issue":{"url":"https://api.github.com/repos/apache/couchdb/issues/689","repository_url":"https://api.github.com/repos/apache/couchdb","labels_url":"https://api.github.com/repos/apache/couchdb/issues/689/labels{/name}","comments_url":"https://api.github.com/repos/apache/couchdb/issues/689/comments","events_url":"https://api.github.com/repos/apache/couchdb/issues/689/events","html_url":"https://github.com/apache/couchdb/pull/689","id":243617354,"number":689,"title":"Make replication ID generation more robust. ","user":{"login":"nickva","id":211822,"avatar_url":"https://avatars3.githubusercontent.com/u/211822?v=4","gravatar_id":"","url":"https://api.github.com/users/nickva","html_url":"https://github.com/nickva","followers_url":"https://api.github.com/users/nickva/followers","following_url":"https://api.github.com/users/nickva/following{/other_user}","gists_url":"https://api.github.com/users/nickva/gists{/gist_id}","starred_url":"https://api.github.com/users/nickva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickva/subscriptions","organizations_url":"https://api.github.com/users/nickva/orgs","repos_url":"https://api.github.com/users/nickva/repos","events_url":"https://api.github.com/users/nickva/events{/privacy}","received_events_url":"https://api.github.com/users/nickva/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-07-18T06:56:46Z","updated_at":"2017-07-29T06:55:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/couchdb/pulls/689","html_url":"https://github.com/apache/couchdb/pull/689","diff_url":"https://github.com/apache/couchdb/pull/689.diff","patch_url":"https://github.com/apache/couchdb/pull/689.patch"},"body":"Replications checkpoint to _local documents identified by replication ids. If\r\nreplication ids change replication tasks will not be able to find their\r\nprevious checkpoints and will rewind their change feeds back to 0. For a large\r\ndatabase that could mean reprocessing millions of documents.\r\n\r\nCurrent version of replication id generation algorithm hashes the full url of\r\nthe source, target, their headers, including authorization ones as well, and a\r\nfew other things. This means when user changes their password and updates their\r\nreplication document, replication ids will change and all the checkpoint will\r\nbe invalidated.\r\n\r\nAlso, it is fairly common to upgrade services from http:// to https://.\r\nReplication endpoint URIs then typically just change their schema part\r\naccordingly. However, schema is part of the replication ID calculation, so\r\nreplication ids would then change as well.\r\n\r\nIntroduce a more robust replication id generation algorithm which can handle\r\nsome of those issues. The new algorithm:\r\n\r\n 1. Excludes source and target URI schema from the replication id calculation.\r\n As long as the host and other parts stay the same changing the schema will\r\n have no effect on the replication id.\r\n\r\n 2. Ignores inline (specified in the URL) basic authentication passwords.\r\n\r\n 3. Ignores basic authentication password even if provided in the\r\n basic authorization headers.\r\n\r\n 4. Is insensitive to switching between providing basic authentication\r\n credentials inline or in a headers section. However it includes the username\r\n used in the basic auth in the calculation. It is plausible scenario that\r\n `http://user1:pass1@a.host.com` is really a different database than\r\n `http://user2:pass2@@a.host.com`\r\n\r\nIssue #688"},"comment":{"url":"https://api.github.com/repos/apache/couchdb/issues/comments/318809503","html_url":"https://github.com/apache/couchdb/pull/689#issuecomment-318809503","issue_url":"https://api.github.com/repos/apache/couchdb/issues/689","id":318809503,"user":{"login":"nickva","id":211822,"avatar_url":"https://avatars3.githubusercontent.com/u/211822?v=4","gravatar_id":"","url":"https://api.github.com/users/nickva","html_url":"https://github.com/nickva","followers_url":"https://api.github.com/users/nickva/followers","following_url":"https://api.github.com/users/nickva/following{/other_user}","gists_url":"https://api.github.com/users/nickva/gists{/gist_id}","starred_url":"https://api.github.com/users/nickva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickva/subscriptions","organizations_url":"https://api.github.com/users/nickva/orgs","repos_url":"https://api.github.com/users/nickva/repos","events_url":"https://api.github.com/users/nickva/events{/privacy}","received_events_url":"https://api.github.com/users/nickva/received_events","type":"User","site_admin":false},"created_at":"2017-07-29T06:55:34Z","updated_at":"2017-07-29T06:55:34Z","body":"@davisp @rnewson \r\n\r\nMade a separate PR to cover a corner case where upgrading to this code could result in lost checkpoints (and change feed rewinds):\r\n\r\nhttps://github.com/apache/couchdb/pull/721"}}
{"actor":{"display_login":"nickva"}}