)]}'
{
  "log": [
    {
      "commit": "d00b981445c03622497088eb872059ab4f48b298",
      "tree": "90cfebe35ace498d0d849cad8388b1bbf06e5772",
      "parents": [
        "f63efa786fec5cc40e6c6193470399da99385abf"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Fri Mar 10 01:15:47 2017 -0500"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Fri Mar 10 01:15:47 2017 -0500"
      },
      "message": "Prevent replicator manager change feeds from getting stuck\n\nSwitch them them from `longpoll` to `normal`\n\nThis would prevent them being stuck. That could happen if more than one\n`resume_scan` message arrives for the same shard. The first time a longpoll\nchangef feed would finish and end sequence is checkpointed. But if another\nresume_scan arrives and database hasn\u0027t changed then the longpoll change\nfeed would hang until db is updated.\n\nThe reason there would be multiple `resume_scan` messages is because there\nis a race condition between db update handler and scanner component. They are\nboth started asynchronously roughly at the same. Scanner finds new shard while\ndb handler notices changes for those shards. If shards are modified quickly\nafter they are discovered by the scanner both of those components would issue\na resume_scan.\n\nThe effect of this would be more pronounced if there are a large number of\n_replicator shards and constant db creation/deletion/updates.\n\nCOUCHDB-2964\n"
    },
    {
      "commit": "f63efa786fec5cc40e6c6193470399da99385abf",
      "tree": "bf3a8974c89dd058a99b07be3da2901005b1157f",
      "parents": [
        "46aa27fa674a4c1e590aeecd76123e4f91d78fd5"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Fri Mar 10 01:13:28 2017 -0500"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Fri Mar 10 01:13:28 2017 -0500"
      },
      "message": "Revert \"Don\u0027t scan empty replicator databases\"\n\nThis reverts commit 46aa27fa674a4c1e590aeecd76123e4f91d78fd5.\n"
    },
    {
      "commit": "46aa27fa674a4c1e590aeecd76123e4f91d78fd5",
      "tree": "e6d53f8c48b41b77216929e3be752453c470ef7e",
      "parents": [
        "ffe9697e728c4725f5ff8915cf592d2d4d0074cc"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Thu Mar 09 18:03:14 2017 +0000"
      },
      "committer": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Thu Mar 09 18:35:22 2017 +0000"
      },
      "message": "Don\u0027t scan empty replicator databases\n\nEvery account gets a _replicator database created by default, the\nburden of scanning them all is considerable.\n\nDon\u0027t start a changes reader if the database is empty (excluding the\ninjected _design/replicator design document)\n\nBugzID: 84311\n"
    },
    {
      "commit": "ffe9697e728c4725f5ff8915cf592d2d4d0074cc",
      "tree": "bf3a8974c89dd058a99b07be3da2901005b1157f",
      "parents": [
        "11667591c1211ef2817945393ec22e0361d900ad",
        "64958096d4f9a940c01cbc472da5265f349c9545"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Tue Mar 07 19:17:26 2017 -0500"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Tue Mar 07 19:17:26 2017 -0500"
      },
      "message": "Merge branch \u002764229-add-new-request-parameter\u0027\n\nCloses #61\n"
    },
    {
      "commit": "64958096d4f9a940c01cbc472da5265f349c9545",
      "tree": "bf3a8974c89dd058a99b07be3da2901005b1157f",
      "parents": [
        "11667591c1211ef2817945393ec22e0361d900ad"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Tue Mar 07 16:42:43 2017 -0500"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Tue Mar 07 16:42:43 2017 -0500"
      },
      "message": "Fix unit test after renaming max_document_size config parameter\n\n`couchdb.max_document_size` was renamed to `httpd.max_http_request_size`\n\nThe unit tests was testing how replicator behaves when faced with reduced\nrequest size configuration on the target.\n\nCOUCHDB-2992\n"
    },
    {
      "commit": "11667591c1211ef2817945393ec22e0361d900ad",
      "tree": "c66052c85849d97582b167ec2d6fbe1c983ef08d",
      "parents": [
        "50a88baafc10c4cf34bce5a54d59e15ca15ea60a",
        "30915e3309fb30c2164e668d33dbd393e77925c0"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Tue Mar 07 14:45:59 2017 -0500"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Tue Mar 07 14:45:59 2017 -0500"
      },
      "message": "Merge remote-tracking branch \u0027cloudant/couchdb-2992-remove-dead-code\u0027\n\nCloses #60\n"
    },
    {
      "commit": "30915e3309fb30c2164e668d33dbd393e77925c0",
      "tree": "c66052c85849d97582b167ec2d6fbe1c983ef08d",
      "parents": [
        "50a88baafc10c4cf34bce5a54d59e15ca15ea60a"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Tue Mar 07 14:38:29 2017 -0500"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Tue Mar 07 14:38:29 2017 -0500"
      },
      "message": "Remove unused mp_parse_doc function from replicator\n\nIt was left accidentally when merging Cloudant\u0027s dbcore work.\n\nCOUCHDB-2992\n"
    },
    {
      "commit": "50a88baafc10c4cf34bce5a54d59e15ca15ea60a",
      "tree": "40a4b97a39c997135f308147f279ef96a709ad41",
      "parents": [
        "7a2b2b68bf4afa6d20b56a8ae51361f83981412a",
        "50dcd7d7c5f7ce003e8e2fc84646c1aa9931ebaa"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Fri Mar 03 10:49:54 2017 -0500"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Fri Mar 03 10:49:54 2017 -0500"
      },
      "message": "Merge remote-tracking branch \u0027cloudant/couchdb-3316\u0027\n\nCloses #59\n"
    },
    {
      "commit": "50dcd7d7c5f7ce003e8e2fc84646c1aa9931ebaa",
      "tree": "40a4b97a39c997135f308147f279ef96a709ad41",
      "parents": [
        "7a2b2b68bf4afa6d20b56a8ae51361f83981412a"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Thu Mar 02 19:12:47 2017 -0500"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Thu Mar 02 19:12:47 2017 -0500"
      },
      "message": "Make sure to log db as well as doc in replicator logs.\n\nCOUCHDB-3316\n"
    },
    {
      "commit": "7a2b2b68bf4afa6d20b56a8ae51361f83981412a",
      "tree": "ca4648a7c4fe64bc18fbc86bcd4d3e9644d5812f",
      "parents": [
        "1e413b8afa6eb156eb5293d1dc0d5726cd5063fc"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Wed Mar 01 11:14:02 2017 +0000"
      },
      "committer": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Wed Mar 01 11:15:59 2017 +0000"
      },
      "message": "fix crashes when replicator db is deleted\n\nBugzID: 83663\n"
    },
    {
      "commit": "1e413b8afa6eb156eb5293d1dc0d5726cd5063fc",
      "tree": "675e9aae112ed530e7fcdfa80f4dc5aba395ea60",
      "parents": [
        "45d739af3fcf8b4f8e3ccca152cb3c2d781dc2fc"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Wed Mar 01 11:15:55 2017 +0000"
      },
      "committer": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Wed Mar 01 11:15:55 2017 +0000"
      },
      "message": "Revert \"Restore adding some jitter-ed sleep to shard scanning code.\"\n\nThis reverts commit 45d739af3fcf8b4f8e3ccca152cb3c2d781dc2fc.\n"
    },
    {
      "commit": "45d739af3fcf8b4f8e3ccca152cb3c2d781dc2fc",
      "tree": "03904fe5d2a9434851868cff9f31f97b47493ea8",
      "parents": [
        "648e465f54f538a133fb31c9b1e3b487a6f2ca7c"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Tue Feb 28 14:00:22 2017 -0500"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Tue Feb 28 14:00:22 2017 -0500"
      },
      "message": "Restore adding some jitter-ed sleep to shard scanning code.\n\nOtherwise a large cluster will flood replicator manager with potentially\nhundreds of thousands of `{resume, Shard}` messages. For each one, it\nwould try to open a changes feed which can add significant load and has\nbeen seen in production to hit varios system limits.\n\nThis brings back the change from before the switch to using mem3 shards\nfor replicator db scans.\n\nAlso adds a few tests.\n\nCOUCHDB-3311\n"
    },
    {
      "commit": "648e465f54f538a133fb31c9b1e3b487a6f2ca7c",
      "tree": "675e9aae112ed530e7fcdfa80f4dc5aba395ea60",
      "parents": [
        "1644696c8c99622eb40a2ef90876e9ecbf716783",
        "46f70c73427e618774872a388287ba682c1376f1"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Wed Feb 08 13:11:47 2017 -0500"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Wed Feb 08 13:11:47 2017 -0500"
      },
      "message": "Merge branch \u0027couchdb-3291-use-infinity\u0027\n\nCloses #55\n"
    },
    {
      "commit": "1644696c8c99622eb40a2ef90876e9ecbf716783",
      "tree": "6487c2a448f1f25a7d7b1f78c0984ff442e53055",
      "parents": [
        "b18b31c6350a6684fe1dc6400979473a9a14f418",
        "c306fab27dbd88d8ecc8f60fb5ec04e7911fd786"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Wed Feb 08 12:50:36 2017 -0500"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Wed Feb 08 12:50:36 2017 -0500"
      },
      "message": "Merge branch \u0027couchdb-3291-better-formatting\u0027\n\nCloses #56\n"
    },
    {
      "commit": "c306fab27dbd88d8ecc8f60fb5ec04e7911fd786",
      "tree": "6487c2a448f1f25a7d7b1f78c0984ff442e53055",
      "parents": [
        "b18b31c6350a6684fe1dc6400979473a9a14f418"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Wed Feb 08 12:02:34 2017 -0500"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Wed Feb 08 12:02:34 2017 -0500"
      },
      "message": "Use string formatting to shorten document ID during logging.\n\nPreviously used an explicit lists:sublist call but value was never used\nanywhere besides the log message.\n\nCOUCHDB-3291\n"
    },
    {
      "commit": "46f70c73427e618774872a388287ba682c1376f1",
      "tree": "db4a3b4247157b7ced0eff5f2b1e4101f0cc2d46",
      "parents": [
        "b18b31c6350a6684fe1dc6400979473a9a14f418"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Wed Feb 08 11:46:13 2017 -0500"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Wed Feb 08 11:46:13 2017 -0500"
      },
      "message": "Switch replicator max_document_id_length config to use infinity\n\nDefault value switched to be `infinity` instead of 0\n\nCOUCHDB-3291\n"
    },
    {
      "commit": "b18b31c6350a6684fe1dc6400979473a9a14f418",
      "tree": "a8500531e43c65aa09d9387eb6aebaba2c063a84",
      "parents": [
        "be0060f3fffc308b7532e6b99355f0e0cdede88e",
        "d23025ebd7176f6c307ddf49902cf20b33bd55c4"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Mon Feb 06 19:46:26 2017 -0500"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Mon Feb 06 19:46:26 2017 -0500"
      },
      "message": "closes #54\n\nMerge branch \u0027couchdb-3291-limit-doc-id-size-in-replicator\u0027\n"
    },
    {
      "commit": "d23025ebd7176f6c307ddf49902cf20b33bd55c4",
      "tree": "a8500531e43c65aa09d9387eb6aebaba2c063a84",
      "parents": [
        "be0060f3fffc308b7532e6b99355f0e0cdede88e"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Fri Feb 03 20:49:32 2017 -0500"
      },
      "committer": {
        "name": "ILYA Khlopotov",
        "email": "iilyak@apache.org",
        "time": "Mon Feb 06 12:18:02 2017 -0800"
      },
      "message": "Allow configuring maximum document ID length during replication\n\nCurrently due to a bug in http parser and lack of document ID length\nenforcement, large document IDs will break replication jobs. Large IDs\nwill pass through the _change feed, revs diffs,  but then fail\nduring open_revs get request. open_revs request will keep retrying until\nit gives up after long enough time, then replication task crashes and\nrestart again with the same pattern. The current effective limit is\naround 8k or so. (The buffer size default 8192 and if the first line\nof the request is larger than that, request will fail).\n\n(See http://erlang.org/pipermail/erlang-questions/2011-June/059567.html\nfor more information about the possible failure mechanism).\n\nBypassing the parser bug by increasing recbuf size, will alow replication\nto finish, however that means simply spreading the abnormal document through\nthe rest of the system, and might not be desirable always.\n\nAlso once long document IDs have been inserted in the source DB. Simply deleting\nthem doesn\u0027t work as they\u0027d still appear in the change feed. They\u0027d have to\nbe purged or somehow skipped during the replication step. This commit helps\ndo the later.\n\nOperators can configure maximum length via this setting:\n```\n  replicator.max_document_id_length\u003d0\n```\n\nThe default value is 0 which means there is no maximum enforced, which is\nbackwards compatible behavior.\n\nDuring replication if maximum is hit by a document, that document is skipped,\nan error is written to the log:\n\n```\nReplicator: document id `aaaaaaaaaaaaaaaaaaaaa...` from source db  `http://.../cdyno-0000001/` is too long, ignoring.\n```\n\nand `\"doc_write_failures\"` statistic is bumped.\n\nCOUCHDB-3291\n"
    },
    {
      "commit": "be0060f3fffc308b7532e6b99355f0e0cdede88e",
      "tree": "e83a583c522707af5e908972889251bba050d015",
      "parents": [
        "b281d2bb320ed6e6d8226765315a40637ba91a46"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Tue Jan 24 23:17:26 2017 -0500"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Tue Jan 24 23:17:26 2017 -0500"
      },
      "message": "Fix shards db name typo from previous commit\n\nPrevious commit which switched to using mem3 for replicator shard\ndiscovery introduced a typo.\n\n `config:get(\"mem3\", \"shard_db\", \"dbs\")`\n\nshould be:\n\n `config:get(\"mem3\", \"shards_db\", \"_dbs\")`\n\nCOUCHDB-3277\n"
    },
    {
      "commit": "b281d2bb320ed6e6d8226765315a40637ba91a46",
      "tree": "4b8bfbfe3be074476779dc74bf0a73170a01b3df",
      "parents": [
        "48996b108c458421c8a73097be152769bdc3fc48"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Tue Jan 24 09:31:39 2017 -0500"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Tue Jan 24 09:31:39 2017 -0500"
      },
      "message": "Use mem3 to discover all _replicator shards in replicator manager\n\nPreviously this was done via recursive db directory traversal, looking for\nshards names ending in `_replicator`. However, if there are orphanned shard\nfiles (not associated with a clustered db), replicator manager crashes. It\nrestarts eventually, but as long as the orphanned shard file\nwithout an entry in dbs db is present on the file system, replicator manager\nwill keep crashing and never reach some replication documents in shards which\nwould be traversed after the problematic shard. The user-visible effect of this\nis some replication documents are never triggered.\n\nTo fix, use mem3 to traverse and discover `_replicator` shards. This was used\nCloudant\u0027s production code for many years it is battle-tested and it doesn\u0027t\nsuffer from file system vs mem3 inconsistency.\n\nLocal `_replicator` db is a special case. Since it is not clustered it will\nnot appear in the clustered db list. However it is already handled as a special\ncase in `init(_)` so that behavior is not affected by this change.\n\nCOUCHDB-3277\n"
    },
    {
      "commit": "48996b108c458421c8a73097be152769bdc3fc48",
      "tree": "9614c983856e6d64a30acd12baea976440647577",
      "parents": [
        "cb41bacb2a06613649df46d62249afebda42b8c0"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Fri Oct 14 15:13:47 2016 -0400"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Fri Oct 14 15:13:47 2016 -0400"
      },
      "message": "Let \"error\" replication document updates bypass the VDU function.\n\nThis is necessary in the case where an software upgrade happens with\na more restrictive VDU function. Replicator db might end up having documents\nwhich would not pass validation anymore, leading to a replicator manager\ncrash when it updates the document with an \"error\" state.\n\nSo in case of an \"error\" state allow malformed document so the user can\nsee the error.\n\nCOUCHDB-3199\n"
    },
    {
      "commit": "cb41bacb2a06613649df46d62249afebda42b8c0",
      "tree": "f62fac9a6d06e5c26d3fdd1df2bde0ddd26663a4",
      "parents": [
        "93c4ceaf97f46e0dd0fcc1deffe966263eda67d3",
        "ada53cbff71c06c924ad4044241d3e01c888e133"
      ],
      "author": {
        "name": "Tony Sun",
        "email": "tony.sun@cloudant.com",
        "time": "Wed Oct 05 10:12:55 2016 -0700"
      },
      "committer": {
        "name": "Tony Sun",
        "email": "tony.sun@cloudant.com",
        "time": "Wed Oct 05 10:12:55 2016 -0700"
      },
      "message": "Merge branch \u00273010-port-429\u0027 into apache\n\nCOUCHDB-3010\n"
    },
    {
      "commit": "ada53cbff71c06c924ad4044241d3e01c888e133",
      "tree": "c33affeb9a3bb18a42b1930ce60a9b845093c3d2",
      "parents": [
        "a51561c1e07e63371cef4f797f063028b4c61999"
      ],
      "author": {
        "name": "Tony Sun",
        "email": "tony.sun@cloudant.com",
        "time": "Mon Oct 03 10:29:14 2016 -0700"
      },
      "committer": {
        "name": "Tony Sun",
        "email": "tony.sun@cloudant.com",
        "time": "Tue Oct 04 22:57:34 2016 -0700"
      },
      "message": "Make backoff macros configurable\n\nCOUCHDB-3010\n"
    },
    {
      "commit": "93c4ceaf97f46e0dd0fcc1deffe966263eda67d3",
      "tree": "766a13364665374720c93db258d8f3cea51f5fbe",
      "parents": [
        "e5747dbaa2fb10760eb2cd3e289a01b51694c7cd"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Mon Oct 03 17:01:52 2016 -0400"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Tue Oct 04 00:45:56 2016 -0400"
      },
      "message": "Add tests which check small values of max_document_size setting on the target\n\nA low max_document_size setting on the target will interact with the replicator,\nthis commit adds a few tests to check that interaction.\n\nThere are 3 test scenarios:\n\n * A basic test checks that individual document sizes can be smaller than\n  max_document_size yet, when batched together by the replicator they exceed,\n  the maximum size. Replicator in that case should split document batches into\n  halves down to individual documents, such that the replication should succeed.\n\n * one_large_one_small test checks that a large single document should be\n  skipped such that it doesn\u0027t end on the target and it doesn\u0027t crash the\n  replication job (so the small document should reach the target).\n\n * The third test is currently disable because of COUCHDB-3174. Once that\n  issue is fixed, it will test a corner case in replicator when it\n  switches from using batches and POST-ing to _bulk_docs to using individual\n  PUT\u0027s with multipart/mixed Content-Type. Those PUT request can also return\n  413 error code, so this tests it explicitly.\n\nJira: COUCHDB-3168\n"
    },
    {
      "commit": "e5747dbaa2fb10760eb2cd3e289a01b51694c7cd",
      "tree": "7d2680b3f810d7eb38840c503b6a81e38235dd99",
      "parents": [
        "2f23b57cd705c87570d98340a4aad1bc611cd4f0"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Tue Oct 04 00:18:25 2016 -0400"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Tue Oct 04 00:45:56 2016 -0400"
      },
      "message": "Fix handling of 413 responses for single document PUT requests\n\nWhen replicator finds a document which has an attachment size greater than 64k,\nor has more than 8 attachments, it switches to a non-batching mode and posts\neach document separately using a PUT request with a multipart/related\nContent-Type.\n\nExplicitly handle the case when the response to the PUT request is a 413. Skip\nthe document and dump `doc_write_failures` count, just like in the case of the\n413 response for a _bulk_docs POST request.\n\nJira: COUCHDB-3168\n"
    },
    {
      "commit": "2f23b57cd705c87570d98340a4aad1bc611cd4f0",
      "tree": "f687fdc3a13fd76666abc667f2a5ba4cd59cedf9",
      "parents": [
        "b9232c8d410d529d65030896e075c4b4327631b0"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Mon Oct 03 15:30:23 2016 -0400"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@apache.org",
        "time": "Mon Oct 03 16:10:04 2016 -0400"
      },
      "message": "Fix replicator handling of max_document_size when posting to _bulk_docs\n\nCurrently `max_document_size` setting is a misnomer, it actually configures\nmaximum request body size. For single document requests it is a good enough\napproximation. However, _bulk_docs updates could fail the total request size\ncheck even if individual documents stay below the maximum limit.\n\nBefore this fix during replication, `_bulk_docs` reqeust would crash, which\neventually leads to an infinite cycles of crashes and restarts (with a\npotential large state being dumped to logs), without replicaton job making\nprogress.\n\nThe is to do binary split on the batch size until either all documents will\nfit under max_document_size limit, or some documents will fail to replicate.\n\nIf documents fail to replicate, they bump the `doc_write_failures` count.\nEffectively `max_document_size` acts as in implicit replication filter in this\ncase.\n\nJira: COUCHDB-3168\n"
    },
    {
      "commit": "a51561c1e07e63371cef4f797f063028b4c61999",
      "tree": "5c91c815742d8255e525355013dfb1f89d9bb3d4",
      "parents": [
        "2db0d7f2a697c7e4aae9ca0ccb1658591a7579c5"
      ],
      "author": {
        "name": "Tony Sun",
        "email": "tony.sun@cloudant.com",
        "time": "Wed Jul 20 21:55:26 2016 -0700"
      },
      "committer": {
        "name": "Tony Sun",
        "email": "tony.sun@cloudant.com",
        "time": "Wed Sep 21 11:39:53 2016 -0700"
      },
      "message": "Fix timeout clause in backoff retry\n\nThe second clause for a timeout will never be reached because the first\nwill always match before the second clause. Switching the clauses to\nfix this.\n\nBugzId:70400\nCOUCHDB-3010\n"
    },
    {
      "commit": "2db0d7f2a697c7e4aae9ca0ccb1658591a7579c5",
      "tree": "5a457352f0340bd55b4e820486c3979e6520cdfe",
      "parents": [
        "80e9578228365277ee20d0b02a1f4bd6514c5f12"
      ],
      "author": {
        "name": "Tony Sun",
        "email": "tony.sun@cloudant.com",
        "time": "Wed Jul 20 21:45:14 2016 -0700"
      },
      "committer": {
        "name": "Tony Sun",
        "email": "tony.sun@cloudant.com",
        "time": "Wed Sep 21 11:39:39 2016 -0700"
      },
      "message": "Retry when connection_closed is received during a streamed response\n\nThe changes_reader uses a streamed response. During the stream, it\u0027s\npossible to receive a connection_closed error due to timeouts or\nnetwork issues. We simply retry the request because for streamed\nresponses a connection must be established first in order for the\nstream to begin. So if the network is truly down, the initial request\nwill fail and the code path will go through the normal retry clause\nwhich decrements the number of retries. This way we won\u0027t be stuck\nforever if it\u0027s an actual network issue.\n\nBugzId: 70400\nCOUCHDB-3010\n"
    },
    {
      "commit": "80e9578228365277ee20d0b02a1f4bd6514c5f12",
      "tree": "2b08f4964e9274e3ea847d397c6d362e6ec6fa3c",
      "parents": [
        "b9232c8d410d529d65030896e075c4b4327631b0"
      ],
      "author": {
        "name": "Tony Sun",
        "email": "tony.sun@cloudant.com",
        "time": "Thu Jun 23 10:26:57 2016 -0700"
      },
      "committer": {
        "name": "Tony Sun",
        "email": "tony.sun@cloudant.com",
        "time": "Wed Sep 21 11:39:24 2016 -0700"
      },
      "message": "Handle 429\n\nWhen we encounter a 429, we retry with a different set of retries and\ntimeout. This will theoretically reduce client replication overload.\nWhen 429s have stopped, it\u0027s possible that a 500 error could occur.\nThen the retry mechanism should go back to the original way for\nbackwards compatibility.\n\nBugzId:60007\nCOUCHDB-3010\n"
    },
    {
      "commit": "b9232c8d410d529d65030896e075c4b4327631b0",
      "tree": "ef0759487e525eca17d8a899fc807077ac554099",
      "parents": [
        "0248d231d2c9903611d401fc9fc5f9f63960ee7f"
      ],
      "author": {
        "name": "Eric Avdey",
        "email": "eiri@eiri.ca",
        "time": "Thu Sep 01 15:59:13 2016 -0300"
      },
      "committer": {
        "name": "Eric Avdey",
        "email": "eiri@eiri.ca",
        "time": "Thu Sep 01 15:59:13 2016 -0300"
      },
      "message": "Validate boolean parameters in /_replicate payload\n"
    },
    {
      "commit": "0248d231d2c9903611d401fc9fc5f9f63960ee7f",
      "tree": "c4acc4b9089d97652b24a6f5e2a03282c2282f9f",
      "parents": [
        "f67ebff225d63d20ccbcbd33de800f86911a5e79",
        "33d386fae3d30bba3e88ab6f01f899a98f28fe4e"
      ],
      "author": {
        "name": "ILYA Khlopotov",
        "email": "iilyak@ca.ibm.com",
        "time": "Tue Aug 23 14:59:43 2016 -0700"
      },
      "committer": {
        "name": "ILYA Khlopotov",
        "email": "iilyak@ca.ibm.com",
        "time": "Tue Aug 23 14:59:43 2016 -0700"
      },
      "message": "Merge remote branch \u0027cloudant:3102-fix-config_subscription\u0027\n\nThis closes #46\n\nSigned-off-by: ILYA Khlopotov \u003ciilyak@ca.ibm.com\u003e\n"
    },
    {
      "commit": "33d386fae3d30bba3e88ab6f01f899a98f28fe4e",
      "tree": "c4acc4b9089d97652b24a6f5e2a03282c2282f9f",
      "parents": [
        "f67ebff225d63d20ccbcbd33de800f86911a5e79"
      ],
      "author": {
        "name": "ILYA Khlopotov",
        "email": "iilyak@ca.ibm.com",
        "time": "Fri Aug 19 16:10:24 2016 -0700"
      },
      "committer": {
        "name": "ILYA Khlopotov",
        "email": "iilyak@ca.ibm.com",
        "time": "Tue Aug 23 12:39:13 2016 -0700"
      },
      "message": "Update handle_config_terminate API\n\nCOUCHDB-3102\n"
    },
    {
      "commit": "f67ebff225d63d20ccbcbd33de800f86911a5e79",
      "tree": "48604f64e0c976f16ac97217861a04ee70a1908b",
      "parents": [
        "40a087630b9b6688fe2db87f1e8adc7972c4a0c9"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Mon Aug 15 03:20:44 2016 -0400"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Mon Aug 15 03:20:44 2016 -0400"
      },
      "message": "Fix passing epoch in correctly with rep_db_checkpoint message.\n\nThis bug was hidden previously because this code never ran due to\nanother bug in handling the stop callback message from change feed.\n\nJira: COUCHDB-3104\n"
    },
    {
      "commit": "40a087630b9b6688fe2db87f1e8adc7972c4a0c9",
      "tree": "f61c1604614cfc450fd7053e6ebf554015029cca",
      "parents": [
        "c233beaec2b497b8484f80ea8e4158327b2c01d5"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Mon Aug 15 02:50:56 2016 -0400"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Mon Aug 15 02:50:56 2016 -0400"
      },
      "message": "Fix replicator manager `stop` change feed callback\n\n```\nchanges_reader_cb({stop, EndSeq, _Pending}, ...) -\u003e\n   ...\n```\n\nat one point used to handle changes from `fabric:changes`. It was later\noptimized to use shard change feeds, but shard change feed callbacks don\u0027t get\npending info with the `stop` message.\n\nAs a result replicator manager would always rescan all the changes in a shard\non any new change.\n\nFor reference, where `couch_changes.erl` calls the callback:\n https://github.com/apache/couchdb-couch/blob/master/src/couch_changes.erl#L654\n\nJira: COUCHDB-3104\n"
    },
    {
      "commit": "c233beaec2b497b8484f80ea8e4158327b2c01d5",
      "tree": "680b040a2ba5f8a348627108b39a299caf06713f",
      "parents": [
        "05247a26019ce5416e13ef80a12c307bdc790ee4",
        "884cf3e55f77ab1a5f26dc7202ce21771062eae6"
      ],
      "author": {
        "name": "ILYA Khlopotov",
        "email": "iilyak@ca.ibm.com",
        "time": "Mon Aug 01 11:04:31 2016 -0700"
      },
      "committer": {
        "name": "ILYA Khlopotov",
        "email": "iilyak@ca.ibm.com",
        "time": "Mon Aug 01 11:04:31 2016 -0700"
      },
      "message": "Merge remote branch \u0027cloudant:69914-insert-random-delays\u0027\n\nThis closes #44\n\nSigned-off-by: ILYA Khlopotov \u003ciilyak@ca.ibm.com\u003e\n"
    },
    {
      "commit": "884cf3e55f77ab1a5f26dc7202ce21771062eae6",
      "tree": "680b040a2ba5f8a348627108b39a299caf06713f",
      "parents": [
        "05247a26019ce5416e13ef80a12c307bdc790ee4"
      ],
      "author": {
        "name": "ILYA Khlopotov",
        "email": "iilyak@ca.ibm.com",
        "time": "Fri Jul 29 14:32:02 2016 -0700"
      },
      "committer": {
        "name": "ILYA Khlopotov",
        "email": "iilyak@ca.ibm.com",
        "time": "Mon Aug 01 10:50:28 2016 -0700"
      },
      "message": "Inject random delays in scan_all_dbs\n\ncouch_replication_server scans filesystem to find all _replication\ndatabases. For every database found it does\n\n    gen_server:cast(Server, {resume_scan, DbName})\n\nExtract independent process where we do gen_server:cast after a random delay.\nThis effectively removes stampede and randomizes the order in which we\nprocess _replication databases.\n\nCOUCHDB-3088\n"
    },
    {
      "commit": "05247a26019ce5416e13ef80a12c307bdc790ee4",
      "tree": "eefaea7472b584958644cceec24f75e9483431e7",
      "parents": [
        "c661e74d2de99007804b6cb60489421d68fe406f"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Tue Jul 26 15:56:42 2016 -0400"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Tue Jul 26 16:00:17 2016 -0400"
      },
      "message": "Replication manager\u0027s rep_start_pids now contains only {Tag, Pid} items\n\nPreviously the local change feed was added to rep_start_pids as Pid only. So if\nreplication manager stopped and terminate/2 was called before that change\nfeed died, then\n\n```\nforeach(fun({_Tag, Pid}) -\u003e ... end, [StartPids])\n```\n\nwould crash with a function clause error.\n\nMake sure add the replicator db name to the changes feed.\n\nJira: COUCHDB-3082\n"
    },
    {
      "commit": "c661e74d2de99007804b6cb60489421d68fe406f",
      "tree": "cfefe5b6044fdb41a0c5830eff074c2d1c0a057d",
      "parents": [
        "bf636d3088e39e392517117e4e5ed4e22f8f7e34"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Tue Jul 26 15:22:52 2016 -0400"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Tue Jul 26 16:00:04 2016 -0400"
      },
      "message": "Replace hard-coded instances of \u003c\u003c\"_replicator\"\u003e\u003e dbs with a macro\n\nThere are 3 of those. For now replace only those which refer to db names, not\nrole.\n\nJira: COUCHDB-3082\n"
    },
    {
      "commit": "bf636d3088e39e392517117e4e5ed4e22f8f7e34",
      "tree": "f96e732365ce14cdac490029043a3dd25209e04e",
      "parents": [
        "8283a30c1406b083a68835a27fe1d4a41e124e9e"
      ],
      "author": {
        "name": "Tony Sun",
        "email": "tony.sun@cloudant.com",
        "time": "Mon Jun 27 18:54:43 2016 -0700"
      },
      "committer": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Mon Jul 18 10:28:17 2016 +0100"
      },
      "message": "Check if worker is alive for clean_mailbox\n\nWhen a connection:close header is sent from the server, we handle it\nby calling ibrowse:stop on the worker and release it from the worker\npool. But our clean_mailbox tries to clean the mailbox of this worker\nwhen it\u0027s already dead, leading to a timeout that crashes the\nchanges_reader process and subsequently the replicator process. So\nwe check to ensure that the Worker is still alive before we call\nibrowse:stream_next.\n\nBugzId:69053\n"
    },
    {
      "commit": "8283a30c1406b083a68835a27fe1d4a41e124e9e",
      "tree": "ca20ad80a7f9b93b18f2d199b675490216147c16",
      "parents": [
        "8629fb2690e4d11ecc0ad15ef032d3f109a93285"
      ],
      "author": {
        "name": "Tony Sun",
        "email": "tony.sun@cloudant.com",
        "time": "Mon Jun 27 18:43:57 2016 -0700"
      },
      "committer": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Mon Jul 18 10:28:11 2016 +0100"
      },
      "message": "Change process_response clause\n\nAn older version of ibrowse would throw a {error, {\u0027EXIT\u0027, Reason}},\nwhen a connection:close header was received. In the newer version\nof ibrowse, it throws {error, req_timedout} instead. This leads\nto a maybe_retry function call because we do not have a clause\nthat handles this error. Which inevitably leads to the replication\nprocess dying once it exhausts the retry limit. So we change\nthe process_response clause to address this bug. However, this also\nmeans we could end up trying forever for real timeouts.\n\nBugzId:69053\n"
    },
    {
      "commit": "8629fb2690e4d11ecc0ad15ef032d3f109a93285",
      "tree": "88249bbc3793601ab652ac4d972ff1049e6cc67f",
      "parents": [
        "8697441137d635fbd6490692cb075912b36c7239"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Thu Jun 09 15:39:04 2016 +0100"
      },
      "committer": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Thu Jun 09 19:56:29 2016 +0100"
      },
      "message": "Ensure _design/_replicator VDU is updated\n"
    },
    {
      "commit": "8697441137d635fbd6490692cb075912b36c7239",
      "tree": "316ccbe517ed5f16706bdd9296835567602d0ce2",
      "parents": [
        "13326bb4b265c09c37f8088c6432f80f495ef0cd",
        "8a4bbc04ae7fe258966ada9a6a7c109174734196"
      ],
      "author": {
        "name": "ILYA Khlopotov",
        "email": "iilyak@ca.ibm.com",
        "time": "Tue May 24 19:00:34 2016 -0700"
      },
      "committer": {
        "name": "ILYA Khlopotov",
        "email": "iilyak@ca.ibm.com",
        "time": "Tue May 24 19:00:34 2016 -0700"
      },
      "message": "Merge remote branch \u0027cloudant:fix-some-type-errors\u0027\n\nThis closes #39\n\nSigned-off-by: ILYA Khlopotov \u003ciilyak@ca.ibm.com\u003e\n"
    },
    {
      "commit": "8a4bbc04ae7fe258966ada9a6a7c109174734196",
      "tree": "316ccbe517ed5f16706bdd9296835567602d0ce2",
      "parents": [
        "13326bb4b265c09c37f8088c6432f80f495ef0cd"
      ],
      "author": {
        "name": "ILYA Khlopotov",
        "email": "iilyak@ca.ibm.com",
        "time": "Tue May 24 18:39:23 2016 -0700"
      },
      "committer": {
        "name": "ILYA Khlopotov",
        "email": "iilyak@ca.ibm.com",
        "time": "Tue May 24 18:39:23 2016 -0700"
      },
      "message": "gen_event: handle_call suppose to return `{ok, Reply, State}`\n"
    },
    {
      "commit": "13326bb4b265c09c37f8088c6432f80f495ef0cd",
      "tree": "33c74caef849a0d038d699f38258b835112dbbe9",
      "parents": [
        "ab0afce2d6fdfeeade636a9252327ac09a1e423f"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Wed Apr 27 15:21:14 2016 -0400"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Fri May 06 10:20:41 2016 -0400"
      },
      "message": "Add jittered delay during replication error handling\n\nFor one-to-many replications, when source fails, it can create a stampede\neffect. A jittered delay is used to avoid that. Delay is random, in a range\nproportional to current number of replications, with a maximum of 1 minute.\n\nSeed random number generator within each replication process with a\nnon-deterministic value, otherwise the same sequence of delays is generated\nfor all replications.\n\nJira: COUCHDB-3006\n"
    },
    {
      "commit": "ab0afce2d6fdfeeade636a9252327ac09a1e423f",
      "tree": "ee3f667c3af124794b1b98ab85b9e0c8938f4c6f",
      "parents": [
        "986549984be44c7e5cd66f3773d2bdd94f506e5c",
        "24fb718c01c37ca40a51339c554fb66ae75c5e42"
      ],
      "author": {
        "name": "ILYA Khlopotov",
        "email": "iilyak@ca.ibm.com",
        "time": "Tue Apr 19 14:49:32 2016 -0700"
      },
      "committer": {
        "name": "ILYA Khlopotov",
        "email": "iilyak@ca.ibm.com",
        "time": "Tue Apr 19 14:49:32 2016 -0700"
      },
      "message": "Merge remote branch \u0027github/pr/35\u0027\n\nThis closes #35\n\nSigned-off-by: ILYA Khlopotov \u003ciilyak@ca.ibm.com\u003e\n"
    },
    {
      "commit": "24fb718c01c37ca40a51339c554fb66ae75c5e42",
      "tree": "ee3f667c3af124794b1b98ab85b9e0c8938f4c6f",
      "parents": [
        "986549984be44c7e5cd66f3773d2bdd94f506e5c"
      ],
      "author": {
        "name": "ILYA Khlopotov",
        "email": "iilyak@ca.ibm.com",
        "time": "Fri Apr 08 11:17:14 2016 -0700"
      },
      "committer": {
        "name": "ILYA Khlopotov",
        "email": "iilyak@ca.ibm.com",
        "time": "Tue Apr 19 14:42:57 2016 -0700"
      },
      "message": "Use couch_db:dbname_suffix in is_replicator_db\n\ncouch_db:dbname_suffix would take shard\u0027s suffix into account.\n\nCOUCHDB-2983\n"
    },
    {
      "commit": "986549984be44c7e5cd66f3773d2bdd94f506e5c",
      "tree": "2a439a54d52ff071c5514c9203abf5c77678f598",
      "parents": [
        "9ee3e19b997258a7d57b993afec34bcbbf4772c5"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Fri Apr 15 18:04:17 2016 -0400"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Mon Apr 18 11:28:53 2016 -0400"
      },
      "message": "Implement Mango selectors for replication\n\nReplication document should have a \"selector\"\nfield with a Mango selector JSON object\nas the value.\n\nFor example:\n```\n{\n    \"_id\": \"r\",\n    \"continuous\": true,\n    \"selector\": {\n        \"_id\": {\n            \"$gte\": \"d2\"\n        }\n    },\n    \"source\": \"http://adm:pass@localhost:15984/a\",\n    \"target\": \"http://adm:pass@localhost:15984/b\"\n}\n```\n\nThis feature underneath uses the _changes feed\nMango selectors capability.\n\nReplicator docs js validation function has been\nupdated to return an error if it notices user has\nspecified both `doc_ids` and `selector`. Or\nthey specified `filter` and either of the other\ntwo.\n\nReplication options parsing also checks for those\nmutually exclusive fields, as replications can be\nstarted from the `_replicate` endpoint not just\nvia the docs in `*_replicator` dbs.\n\nWhen generating a replication id, Mango selector\nobject is normalized and sorted (JSON fields\nare sorted inside objects only). That is done in order\nto reduce the chance of creating two different\nreplication checkpoints for same Mango selector.\n\nJira: COUCHDB-2988\n"
    },
    {
      "commit": "9ee3e19b997258a7d57b993afec34bcbbf4772c5",
      "tree": "6c6080f8cb4f5a76d9ba507de6a9a8afc5d8ce35",
      "parents": [
        "fb004ea6f1c1740fec9deb76e475a73ce5353e63"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Thu Mar 31 11:50:53 2016 -0400"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Thu Mar 31 14:48:37 2016 -0400"
      },
      "message": "Reduce checkpoint frequency from 5 to 30 seconds\n\nUse a macro to avoid hard-coding magic number\nin two places.\n\nCOUCHDB-2979\n"
    },
    {
      "commit": "fb004ea6f1c1740fec9deb76e475a73ce5353e63",
      "tree": "1cd160cbdff62ab67217ccd9919897cb03b54b1d",
      "parents": [
        "89d57cd10d36eb9a5b300568bad037d99998e241"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Fri Mar 25 15:46:40 2016 +0000"
      },
      "committer": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Fri Mar 25 15:46:40 2016 +0000"
      },
      "message": "Revert \"Merge remote-tracking branch \u0027cloudant/2975-restart-replications-on-crash\u0027\"\n\nThis reverts commit 89d57cd10d36eb9a5b300568bad037d99998e241, reversing\nchanges made to 197950631b8a73a8c36b744fc9eb00debc15ac03.\n"
    },
    {
      "commit": "89d57cd10d36eb9a5b300568bad037d99998e241",
      "tree": "dbe220ab1814bb23ea0e95ae8e91e6bca3bdadc3",
      "parents": [
        "197950631b8a73a8c36b744fc9eb00debc15ac03",
        "4cb517659c235c06a39ee7eb6b4150cdfded6116"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Thu Mar 24 18:31:28 2016 +0000"
      },
      "committer": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Thu Mar 24 18:31:28 2016 +0000"
      },
      "message": "Merge remote-tracking branch \u0027cloudant/2975-restart-replications-on-crash\u0027\n"
    },
    {
      "commit": "4cb517659c235c06a39ee7eb6b4150cdfded6116",
      "tree": "dbe220ab1814bb23ea0e95ae8e91e6bca3bdadc3",
      "parents": [
        "eb93044ca4aa02ab4427ec7082df37bae6602973"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Thu Mar 24 13:40:14 2016 +0000"
      },
      "committer": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Thu Mar 24 13:40:14 2016 +0000"
      },
      "message": "Reduce likelihood of a bad replication job taking down the job supervisor\n\nWhile we can\u0027t disable max_restart_intensity, we can make it unlikely\nto happen. Ordinarily, we would want this behaviour, but replication\njobs involve human input. A bad password, or malformed url, etc, can\ncause repeated and fast crashing.\n\nFor now, we require ten crashes within one second before we would\nbounce the job supervisor. In future, we should manage replication\njobs with greater care.\n\nCOUCHDB-2975\n"
    },
    {
      "commit": "eb93044ca4aa02ab4427ec7082df37bae6602973",
      "tree": "73bbec40a0bf373dc12fd125094444bbd581a5c2",
      "parents": [
        "73afc584bd10f68626d2049442b5a6058ff002db"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Thu Mar 24 11:29:10 2016 +0000"
      },
      "committer": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Thu Mar 24 12:17:24 2016 +0000"
      },
      "message": "Use transient restart type for all replications\n\nWe want replication tasks to be restarted automatically if they crash\nabnormally. Replication tasks that complete or are cancelled (by\ndeleting the backing _replicator doc or issuing an \"cancel\":true for\nnon-persistent jobs) should still exit, should not be restarted, and\nshould not have their child spec linger in the supervisor.\n\nCOUCHDB-2975\n"
    },
    {
      "commit": "73afc584bd10f68626d2049442b5a6058ff002db",
      "tree": "e41f166b24fbe164b570ed73635486e357cecc21",
      "parents": [
        "b26c6f0ea6e7568a1d51890ffead941c4ca9cced"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Thu Mar 24 11:26:08 2016 +0000"
      },
      "committer": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Thu Mar 24 12:17:06 2016 +0000"
      },
      "message": "Remove obsoleted R14-era code\n\nWe no longer support R14 so we\u0027re dropping R14-specific complications\nin the codebase.\n\nCOUCHDB-2975\n"
    },
    {
      "commit": "197950631b8a73a8c36b744fc9eb00debc15ac03",
      "tree": "1cd160cbdff62ab67217ccd9919897cb03b54b1d",
      "parents": [
        "2363748baca628f69563c571711be45771f2a352",
        "b26c6f0ea6e7568a1d51890ffead941c4ca9cced"
      ],
      "author": {
        "name": "Eric Avdey",
        "email": "eiri@eiri.ca",
        "time": "Fri Mar 11 17:04:55 2016 -0400"
      },
      "committer": {
        "name": "Eric Avdey",
        "email": "eiri@eiri.ca",
        "time": "Fri Mar 11 17:04:55 2016 -0400"
      },
      "message": "Merge remote branch \u0027github/pr/32\u0027\n\nThis closes #32\n\nSigned-off-by: Eric Avdey \u003ceiri@eiri.ca\u003e\n"
    },
    {
      "commit": "b26c6f0ea6e7568a1d51890ffead941c4ca9cced",
      "tree": "1cd160cbdff62ab67217ccd9919897cb03b54b1d",
      "parents": [
        "2363748baca628f69563c571711be45771f2a352"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Wed Mar 09 15:05:46 2016 -0500"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Wed Mar 09 15:05:46 2016 -0500"
      },
      "message": "Fix flaky replicator tests.\n\nReplication+compaction test periodically times out\nwhen running under CI. Adjust writer timeout from 3 to 9 sec.\n\nAlso clean up confusing / unused TIMEOUT_STOP constant.\n"
    },
    {
      "commit": "2363748baca628f69563c571711be45771f2a352",
      "tree": "f4cf1b9af5bb053fb99fd77ed8ff524c8f2e1259",
      "parents": [
        "7ff43edd44127fb517be94e104e1621b9478b9f2"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Tue Mar 08 19:37:17 2016 -0500"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Wed Mar 09 13:32:19 2016 -0500"
      },
      "message": "After a rescan prevent checkpoints from a previous epoch\n\nFix race condition which happens on rescan: rescan\nfunction resets all checkpoints for replicator databases.\nHowever before new change feeds start processing all\ndocuments from sequence 0, a checkpoint could\nhappen from an existing change feed, which would\neffectively result in a range of documents being\nskipped over.\n\nAdd an `epoch` ref to State. On rescan update\nthe epoch. Thread epoch through the change feed process\nand callbacks, then only allow checkpoints from current\nepoch.\n\nJIRA: COUCHDB-2965\n"
    },
    {
      "commit": "7ff43edd44127fb517be94e104e1621b9478b9f2",
      "tree": "acbc3a1d42ac00ab33d40b2ffca2755572b5f90a",
      "parents": [
        "493a0d11d43b512ae81195f84aab0336ca61e94f",
        "a7e7565d6a743961ebdec155fbfd70f609337ce2"
      ],
      "author": {
        "name": "Benjamin Bastian",
        "email": "benjamin.bastian@gmail.com",
        "time": "Fri Mar 04 15:52:11 2016 -0800"
      },
      "committer": {
        "name": "Benjamin Bastian",
        "email": "benjamin.bastian@gmail.com",
        "time": "Fri Mar 04 15:52:11 2016 -0800"
      },
      "message": "Merge remote-tracking branch \u0027cloudant/couchdb-2963\u0027\n"
    },
    {
      "commit": "a7e7565d6a743961ebdec155fbfd70f609337ce2",
      "tree": "ff810e388fcdfd1f0d52aa40932d7373214db119",
      "parents": [
        "da860981c9718ba3a119236edcb01d1b4ad85d65"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Fri Mar 04 15:06:41 2016 -0500"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Fri Mar 04 15:06:41 2016 -0500"
      },
      "message": "Switch replicator manager change feeds to \"longpoll\"\n\nFixes replication manager rescans on cluster membership\nchange.\n\nReplication manager resets all replication db\nsequence checkpoints, and starts a new replicator db\nbackground scanner.  Each replicator database is signaled\nto rescan from sequence 0. However previous change feeds\nfor each db have to exit first. If they never exit, because\nthey are \"continuous\" new change feeds will never start.\n\nPutting change feeds in \"longpoll\" mode ensures they will\neventually exit.\n\nJIRA: COUCHDB-2963\n"
    },
    {
      "commit": "493a0d11d43b512ae81195f84aab0336ca61e94f",
      "tree": "0e6f1b6314963dd98bbcd9a12d954651b6f27d81",
      "parents": [
        "da860981c9718ba3a119236edcb01d1b4ad85d65"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Thu Mar 03 23:38:20 2016 -0500"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Fri Mar 04 01:31:45 2016 -0500"
      },
      "message": "Adjust minimum number of http connections to 2\n\nReplication changes feed and main replicator process could\nend up waiting on the http connection to be available, and also\nwaiting on each other in a gen_server call. So set minimum\nnumber of http connections to 2 to avoid deadlock.\n\nJIRA: COUCHDB-2959\n"
    },
    {
      "commit": "da860981c9718ba3a119236edcb01d1b4ad85d65",
      "tree": "352d1b763d2663e04f8a224ced316631c62b8bbb",
      "parents": [
        "fc49a366cb51522bc2be8c2aa022cd9636528c9c",
        "e1fa3c3fa197ef1bf5a188e567a4f5996e56b30d"
      ],
      "author": {
        "name": "ILYA Khlopotov",
        "email": "iilyak@ca.ibm.com",
        "time": "Wed Mar 02 12:36:54 2016 -0800"
      },
      "committer": {
        "name": "ILYA Khlopotov",
        "email": "iilyak@ca.ibm.com",
        "time": "Wed Mar 02 12:36:54 2016 -0800"
      },
      "message": "    Merge remote branch \u0027github/pr/27\u0027\n\n    - https://github.com/apache/couchdb-couch-replicator/pull/27\n\n    This closes #27\n\n    Signed-off-by: ILYA Khlopotov \u003ciilyak@ca.ibm.com\u003e\n"
    },
    {
      "commit": "e1fa3c3fa197ef1bf5a188e567a4f5996e56b30d",
      "tree": "352d1b763d2663e04f8a224ced316631c62b8bbb",
      "parents": [
        "fc49a366cb51522bc2be8c2aa022cd9636528c9c"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Fri Feb 26 16:10:27 2016 -0500"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Wed Mar 02 10:26:13 2016 -0500"
      },
      "message": "Remove configurable replicator db name\n\nJIRA: COUCHDB-2954\n"
    },
    {
      "commit": "fc49a366cb51522bc2be8c2aa022cd9636528c9c",
      "tree": "7d9d7485f57b446b8e83dde3e61d3e355f652a19",
      "parents": [
        "ff49e1c47323239dff568da3b90b596097dc8d99"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Mon Feb 29 18:45:58 2016 -0500"
      },
      "committer": {
        "name": "Mike Wallace",
        "email": "mikewallace@apache.org",
        "time": "Tue Mar 01 18:05:58 2016 +0000"
      },
      "message": "Do not crash in couch_replicator:terminate/2 if a local dbname is used.\n\nEven though local source or target database names are not valid\nfor replication in CouchDB 2.0, do not crash when trying to\nstrip credentials. Replicator process has to terminate properly\nin order to report the error in the replication document for\nuser feedback.\n\nJIRA: COUCHDB-2949\n\nThis closes #28\n\nSigned-off-by: Mike Wallace \u003cmikewallace@apache.org\u003e\n"
    },
    {
      "commit": "ff49e1c47323239dff568da3b90b596097dc8d99",
      "tree": "02d678fe337d42c6c7de484226f17dfb30544f23",
      "parents": [
        "fd66cb6b3dc70a64b556bb1e5bd9fa05f20df571"
      ],
      "author": {
        "name": "Eric Avdey",
        "email": "eiri@eiri.ca",
        "time": "Tue Feb 23 10:13:06 2016 -0400"
      },
      "committer": {
        "name": "Eric Avdey",
        "email": "eiri@eiri.ca",
        "time": "Fri Feb 26 09:51:24 2016 -0400"
      },
      "message": "Fix view filtered replication\n\nThe output for get_view_info function has been normalized\nand URL for views\u0027 info got fixed.\n\nThe ddoc\u0027s update_seq is not applicable to a database changes feed\nused for the filtering by none seq indexed views, so we\u0027ll use database\nupdate_seq instead.\n"
    },
    {
      "commit": "fd66cb6b3dc70a64b556bb1e5bd9fa05f20df571",
      "tree": "5dd980bd227834eda538f67d55a94e3057d47a81",
      "parents": [
        "61c59b5d7349b222276639bd839d3817542583c8"
      ],
      "author": {
        "name": "Mike Wallace",
        "email": "mikewallace@apache.org",
        "time": "Wed Feb 10 14:59:50 2016 +0000"
      },
      "committer": {
        "name": "Mike Wallace",
        "email": "mikewallace@apache.org",
        "time": "Fri Feb 12 17:55:47 2016 +0000"
      },
      "message": "Avoid logging creds on couch_replicator termination\n\nWhen couch_replicator terminates with an error we log the #rep\nrecord which can contain credentials for the source or target\nof a replication, either in the url directly or in an Authorization\nheader.\n\nThis commit adds a function to strip credentials from the #httpdb\nrecords in the #rep record and replace them with ****.\n\nSpecifically this concerns the url and headers fields of the\n #rep.source and #rep.target #httpdb records.\n\nWe also add the format_status/2 callback and strip creds from the\n #rep_state record in the gen_server state to prevent the creds\nin the state getting logged in the event of a crash.\n\nCloses COUCHDB-2949\n\nThis closes #25\n"
    },
    {
      "commit": "61c59b5d7349b222276639bd839d3817542583c8",
      "tree": "886ab8aae24da8e0ce0580a553ce1cbbc83528ee",
      "parents": [
        "b18ff40d3adde03f4f85f9acff4950ddbb3b2e06"
      ],
      "author": {
        "name": "Eric Avdey",
        "email": "eiri@eiri.ca",
        "time": "Fri Feb 05 13:15:33 2016 -0400"
      },
      "committer": {
        "name": "Eric Avdey",
        "email": "eiri@eiri.ca",
        "time": "Thu Feb 11 08:28:07 2016 -0400"
      },
      "message": "Add filtered with query replication test\n"
    },
    {
      "commit": "b18ff40d3adde03f4f85f9acff4950ddbb3b2e06",
      "tree": "33acc60b670a0b85d7919c3050f5a8af80eeb352",
      "parents": [
        "ea408866cb1a5f563180ee1e5508bb49ad2192c7"
      ],
      "author": {
        "name": "Eric Avdey",
        "email": "eiri@eiri.ca",
        "time": "Fri Feb 05 11:28:49 2016 -0400"
      },
      "committer": {
        "name": "Eric Avdey",
        "email": "eiri@eiri.ca",
        "time": "Thu Feb 11 08:28:07 2016 -0400"
      },
      "message": "Fix filtered replication test\n"
    },
    {
      "commit": "ea408866cb1a5f563180ee1e5508bb49ad2192c7",
      "tree": "f5205fb6edf87cb45aad10f09f04f5bcc3aeb4d9",
      "parents": [
        "3f268abba89bd5b93f43185465e66ef42b3876ad",
        "254750aaf0a7aacb99c0e81d4c232b1b57005620"
      ],
      "author": {
        "name": "Alexander Shorin",
        "email": "kxepal@apache.org",
        "time": "Thu Feb 11 15:18:39 2016 +0300"
      },
      "committer": {
        "name": "Alexander Shorin",
        "email": "kxepal@apache.org",
        "time": "Thu Feb 11 15:18:39 2016 +0300"
      },
      "message": "Merge branch \u0027github/pr/15\u0027\n"
    },
    {
      "commit": "254750aaf0a7aacb99c0e81d4c232b1b57005620",
      "tree": "f5205fb6edf87cb45aad10f09f04f5bcc3aeb4d9",
      "parents": [
        "d7113857421d2bf839d6a303a7728eadc296b364"
      ],
      "author": {
        "name": "Alexander Shorin",
        "email": "kxepal@apache.org",
        "time": "Tue Nov 10 02:43:52 2015 +0300"
      },
      "committer": {
        "name": "Alexander Shorin",
        "email": "kxepal@apache.org",
        "time": "Thu Feb 11 15:18:25 2016 +0300"
      },
      "message": "Update Travis config\n\n- Add license header\n- Clone CouchDB faster\n- Test against Erlang 18.1 and 18.2\n- Drop R14B04 support\n- Use new better way to run specific app tests\n- Use containers\n"
    },
    {
      "commit": "d7113857421d2bf839d6a303a7728eadc296b364",
      "tree": "4b319c767e0cdac95fb2d172fe58ed1264916fc3",
      "parents": [
        "3f268abba89bd5b93f43185465e66ef42b3876ad"
      ],
      "author": {
        "name": "Alexander Shorin",
        "email": "kxepal@apache.org",
        "time": "Sun Aug 23 13:28:18 2015 +0300"
      },
      "committer": {
        "name": "Alexander Shorin",
        "email": "kxepal@apache.org",
        "time": "Thu Feb 11 15:11:01 2016 +0300"
      },
      "message": "Integrate with Travis CI\n"
    },
    {
      "commit": "3f268abba89bd5b93f43185465e66ef42b3876ad",
      "tree": "982d6eee4837fc481373c5a149e1fde77cfad070",
      "parents": [
        "437c6571fc332802801cdaef4c3c2228fa4fc01e"
      ],
      "author": {
        "name": "Paul J. Davis",
        "email": "paul.joseph.davis@gmail.com",
        "time": "Wed Nov 04 18:48:07 2015 -0600"
      },
      "committer": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Thu Nov 12 10:53:00 2015 +0000"
      },
      "message": "Fix couch_replicator_manager rescans\n\nWhen couch_replicator_manager starts it scans every _replicator database\nlooking for replications to start. When it starts the replication it\nmodifies a document in the _replicator database. This change ends up\nsending a message back to couch_replicator_manager to rescan the\ndatabase. This message to rescan the database had no protection to be\nunique. This would result in many processes re-scanning the same\ndatabase over and over.\n\nTo fix this we track the DbName for every scanning process so that if we\nget a change to a database we can ignore the change because a scanner\npid is already running. However we also have to track if we need to\nrestart the scanning pid when it finishes so that we ensure that we\nprocess any changes that occurred during the scan.\n\nCOUCHDB-2878\n"
    },
    {
      "commit": "437c6571fc332802801cdaef4c3c2228fa4fc01e",
      "tree": "a196fa2313a6e19fe8744e3d74726253699e2685",
      "parents": [
        "3ce785710e28222064bfcfd68d7fd0af96b72add"
      ],
      "author": {
        "name": "Jay Doane",
        "email": "jay.s.doane@gmail.com",
        "time": "Mon Jul 13 21:41:18 2015 -0700"
      },
      "committer": {
        "name": "Alexander Shorin",
        "email": "kxepal@apache.org",
        "time": "Tue Nov 03 00:11:49 2015 +0300"
      },
      "message": "Throw bad request when doc_ids parameter is not an array (or null)\n\nBugzID: 48602\n\nSigned-off-by: Alexander Shorin \u003ckxepal@apache.org\u003e\n"
    },
    {
      "commit": "3ce785710e28222064bfcfd68d7fd0af96b72add",
      "tree": "976afddc57bcb6214f2826534bb0927dc867332f",
      "parents": [
        "e58f535ca611acb40bb620ee2f6a3da4c187bcf7"
      ],
      "author": {
        "name": "Robert Kowalski",
        "email": "rok@kowalski.gd",
        "time": "Fri Jun 26 23:44:03 2015 +0200"
      },
      "committer": {
        "name": "Robert Kowalski",
        "email": "rok@kowalski.gd",
        "time": "Sun Oct 18 12:16:57 2015 +0200"
      },
      "message": "revert cdf8949 (couch_util:rfc1123_date)\n\nthis got fixed in R14B02 as OTP-9087\n\nCOUCHDB-627\n"
    },
    {
      "commit": "e58f535ca611acb40bb620ee2f6a3da4c187bcf7",
      "tree": "1c7dba5c71b70344729df7155c9b798157de18cc",
      "parents": [
        "56422436762c8fa3cc4081311f9a10ea06826443"
      ],
      "author": {
        "name": "ILYA Khlopotov",
        "email": "iilyak@ca.ibm.com",
        "time": "Fri May 22 06:04:39 2015 -0700"
      },
      "committer": {
        "name": "Alexander Shorin",
        "email": "kxepal@apache.org",
        "time": "Sun Oct 18 03:06:05 2015 +0300"
      },
      "message": "Add a test case for filtered replication\n\nThis closes #10\n\nSigned-off-by: Alexander Shorin \u003ckxepal@apache.org\u003e\n"
    },
    {
      "commit": "56422436762c8fa3cc4081311f9a10ea06826443",
      "tree": "ee91e427dda0b7a0fe6df061a672aefa0107b766",
      "parents": [
        "f02919206e97f9adc7d6379accd0c406dccf2118"
      ],
      "author": {
        "name": "Alexander Shorin",
        "email": "kxepal@apache.org",
        "time": "Fri Oct 16 23:47:37 2015 +0300"
      },
      "committer": {
        "name": "Alexander Shorin",
        "email": "kxepal@apache.org",
        "time": "Fri Oct 16 23:47:37 2015 +0300"
      },
      "message": "Raise eunit tests timeout up to 100s\n\nSince we don\u0027t use delayed_commits anymore, our tests started to do\nmore intensive disk I/O work and becomes slower.\n\nThe value is picked as pessimistic case for slow HDD users which run\nsome background I/O operations.\n"
    },
    {
      "commit": "f02919206e97f9adc7d6379accd0c406dccf2118",
      "tree": "eb0ec93995a5ba6d108cf06f31ebbb9b4377cf7a",
      "parents": [
        "e2ecd854eabe8202b2d413b612125c3dcf9176e0"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Fri Oct 16 14:05:40 2015 -0400"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Fri Oct 16 14:13:15 2015 -0400"
      },
      "message": "Fix race condition in waiting for compactor in eunit test.\n\nMonitor waiting for replicator will sometimes fail with noproc\nerror, because there is a race condition between a running\ncompactor process and setting up its monitor and waiting on it.\n\nThis error appears about once or twice in a 100 runs.\nIt can be made to appear more often by tweaking 50 and 5 values in:\n```\n should_populate_and_compact(RepPid, Source, Target, 50, 5),\n```\nto something like 1, 20.\n\nThis commit fixes race condition by handling noproc.\n"
    },
    {
      "commit": "e2ecd854eabe8202b2d413b612125c3dcf9176e0",
      "tree": "041ffd638b53f4cbb65ca53775fc7702e61f40c9",
      "parents": [
        "219f5d181a4effbd82c2c38ca3244a214d5552d5",
        "307ae6d92fd300d31d6eb96bd5aca5b9a558a66d"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Fri Oct 16 10:49:36 2015 +0100"
      },
      "committer": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Fri Oct 16 10:49:36 2015 +0100"
      },
      "message": "Merge remote-tracking branch \u0027cloudant/2833-fix-race-condition-during-worker-termination\u0027\n"
    },
    {
      "commit": "219f5d181a4effbd82c2c38ca3244a214d5552d5",
      "tree": "01805a6a0effb03eed97fff3b18a850b9a1b2801",
      "parents": [
        "36e5beccd661158260c3985ae0b5f439022ab15b"
      ],
      "author": {
        "name": "Alexander Shorin",
        "email": "kxepal@apache.org",
        "time": "Thu Oct 15 22:47:13 2015 +0300"
      },
      "committer": {
        "name": "Alexander Shorin",
        "email": "kxepal@apache.org",
        "time": "Thu Oct 15 22:47:13 2015 +0300"
      },
      "message": "Fix new couch_httpd_multipart:abort_multipart_stream API call\n"
    },
    {
      "commit": "307ae6d92fd300d31d6eb96bd5aca5b9a558a66d",
      "tree": "44042610ecd1a63ade5f18b2e8ba3bb35395e6c7",
      "parents": [
        "36e5beccd661158260c3985ae0b5f439022ab15b"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Thu Oct 15 13:54:10 2015 -0400"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Thu Oct 15 13:54:10 2015 -0400"
      },
      "message": "Fix race condition in worker release on connection_closing state.\n\nThis is exposed in the replicator large attachments tests case,\nreplicating from local to remote. In the current test configuration\nit appears about once in 20-40 times. The failure manifests as\nup as an {error, req_timedout} exception in the logs from one of the\nPUT methods, during push replication. Then database comparison fails\nbecause not all documents made it to the target.\n\nGory details:\n\nAfter ibrowse receives Connection: Close header it will go into\nshutdown \u0027connection_closing\u0027 state.\n\ncouch_replicator_httpc handles that state by trying to close\nthe socket and retrying, hoping that it would pick up a new worker from\nthe pool on next retry in couch_replicator_httpc.erl:\n\n```\nprocess_response({error, connection_closing}, Worker, HttpDb, Params, _Cb) -\u003e\n    ...\n```\n\nBut it did not directly have a way to ensure socket is really closed,\ninstead it called ibrowse_http_client:stop(Worker). That didn\u0027t wait for\nworker to die, also worker was returned back to the pool asynchronously,\nin the \u0027after\u0027 clause in couch_replicator_httpc:send_req/3.\n\nThis worker which could still be alive but in a dying process,\ncould have been picked up immediately during the retry.\nibrowse in ibrowse:do_send_req/7 will handle a dead workers\nprocess as {error, req_timedout}, which is what the intermitend\ntest failure showed in the log:\n\nThe fix:\n\n * Make sure worker is really stopped after calling stop.\n\n * Make sure worker is returned to the pool synchronously. So that\n   on retry, a worker in a known good state is picked up.\n\nCOUCHDB-2833\n"
    },
    {
      "commit": "36e5beccd661158260c3985ae0b5f439022ab15b",
      "tree": "06dec96306a7d4c078fcbb52922b6f0866b3ab5b",
      "parents": [
        "85d62d1e2b72250c329b4b10db4df1231e647933",
        "b88601bf974b9537d8fc0e94e86cc072d9a5f449"
      ],
      "author": {
        "name": "Alexander Shorin",
        "email": "kxepal@apache.org",
        "time": "Thu Oct 15 19:37:26 2015 +0300"
      },
      "committer": {
        "name": "Alexander Shorin",
        "email": "kxepal@apache.org",
        "time": "Thu Oct 15 19:37:26 2015 +0300"
      },
      "message": "Merge remote-tracking branch \u0027github/pr/4\u0027\n"
    },
    {
      "commit": "85d62d1e2b72250c329b4b10db4df1231e647933",
      "tree": "ec0bcfd841b8a6df7797a4c855a9b1845ab549dc",
      "parents": [
        "73139f0ebaee1b7bb49f926aebb0c3106c21ce74"
      ],
      "author": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Fri Oct 02 09:55:42 2015 -0400"
      },
      "committer": {
        "name": "Nick Vatamaniuc",
        "email": "vatamane@gmail.com",
        "time": "Fri Oct 02 10:03:24 2015 -0400"
      },
      "message": "Handle un-expected closing of pipelined connections better.\n\nIf during a pipelined connection, server closes its socket,\nbut http client has more requests to send, ibrowse will\ndetect that when it sends next request and throw\n{error, connection_closing}.\n\nHandle that error better, by closing the socket explicitly\nand retrying the pipelined request that failed.\n\nCOUCHDB-2833\n"
    },
    {
      "commit": "73139f0ebaee1b7bb49f926aebb0c3106c21ce74",
      "tree": "c6f19eaffcf0dfa38717fe02a3f26d966fc2ee1e",
      "parents": [
        "b695bb293aceb2a3157da70138dbf3966f1a64e6"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Wed Sep 23 19:28:10 2015 +0100"
      },
      "committer": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Wed Sep 23 19:28:10 2015 +0100"
      },
      "message": "Fix crypto deprecations\n\nCOUCHDB-2825\n"
    },
    {
      "commit": "b695bb293aceb2a3157da70138dbf3966f1a64e6",
      "tree": "1bcf3f8f116c20bf6c3e317fe7bd6419295128f7",
      "parents": [
        "90d70883eb7e53beed09752ae7e41a4d386a2ede"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Sat Sep 12 17:47:13 2015 +0100"
      },
      "committer": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Sun Sep 13 11:18:17 2015 +0100"
      },
      "message": "Include originating database\n\nAny database whose path ends in /_replicator is considered a\nreplicator database. Show this name in the active tasks output so that\nthe doc_id can be easily found in all cases.\n"
    },
    {
      "commit": "90d70883eb7e53beed09752ae7e41a4d386a2ede",
      "tree": "f3533b8b578d03d4a21cfc591f63406e498eda3c",
      "parents": [
        "227cbc6475db926ec9fb1b5cc93c149299484ce7"
      ],
      "author": {
        "name": "Paul J. Davis",
        "email": "paul.joseph.davis@gmail.com",
        "time": "Tue Jun 09 11:34:57 2015 -0500"
      },
      "committer": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Mon Aug 24 16:39:57 2015 +0100"
      },
      "message": "Fix changes worker timeout cleanup\n\nPreviously if we timed out waiting for the next message the changes\nreader would end up just exiting with an error. Unfortunately the\nibrowse worker doesn\u0027t bother noticing that its streaming target has\ndied and will wait in perpetuity. If the main replication process\nhappens to be waiting on this HTTP worker it\u0027ll block indefinitely and\nnever make progress in the replication.\n\nThis change just ensures that the ibrowse worker is killed which will\ncause the main replication pid to restart.\n\nThis particular bug has been observed on the Oculus clusters at a fairly\nlow rate so the cost of restarting a replication shouldn\u0027t be an issue.\n\nBugzId: 47971\n"
    },
    {
      "commit": "227cbc6475db926ec9fb1b5cc93c149299484ce7",
      "tree": "aeee277cfd161c39786acabc80db61e7a395305a",
      "parents": [
        "0c8b69d4137518557f1841ec737da272b509c94b"
      ],
      "author": {
        "name": "Paul J. Davis",
        "email": "paul.joseph.davis@gmail.com",
        "time": "Tue Jul 21 16:01:46 2015 -0500"
      },
      "committer": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Mon Aug 24 16:39:28 2015 +0100"
      },
      "message": "Fix stuck changes reader in clean_mailbox\n\nDue to unfortunate timing issues it was possible for a changes reader to\nget stuck in clean_mailbox reading an entire changes feed before\nexiting. If the ibrowse call timed out right before ibrowse starts\nsending messages then we would see clean_mailbox loop until the changes\nfeed terminated on the source.\n\nThis caps the number of messagses that can be cleaned up to a maximum of\nsixteen. This limit is rather arbitrary. The cleanup was intended for when\nonly a couple messages were lingering. This is much larger than that\nwithout being insanely large.\n\nBugzId: 49717\n"
    },
    {
      "commit": "0c8b69d4137518557f1841ec737da272b509c94b",
      "tree": "26f32660080f8bee79eca54265a02087877c92d0",
      "parents": [
        "63877ae33acbeae67f801180055d5c681aab48a7"
      ],
      "author": {
        "name": "Alexander Shorin",
        "email": "kxepal@apache.org",
        "time": "Sun Aug 23 13:26:41 2015 +0300"
      },
      "committer": {
        "name": "Alexander Shorin",
        "email": "kxepal@apache.org",
        "time": "Sun Aug 23 13:26:52 2015 +0300"
      },
      "message": "Add LICENSE file\n"
    },
    {
      "commit": "63877ae33acbeae67f801180055d5c681aab48a7",
      "tree": "91970bd59ac80d6a6efa38cc584f6ca03e5b8b2b",
      "parents": [
        "cfda5357a3d5833613eeca64114131fd406ad5f1"
      ],
      "author": {
        "name": "ILYA Khlopotov",
        "email": "iilyak@ca.ibm.com",
        "time": "Fri Jul 31 11:37:44 2015 -0700"
      },
      "committer": {
        "name": "ILYA Khlopotov",
        "email": "iilyak@ca.ibm.com",
        "time": "Fri Jul 31 11:37:44 2015 -0700"
      },
      "message": "Return `{error, {illegal_database_name, Name}}`\n"
    },
    {
      "commit": "cfda5357a3d5833613eeca64114131fd406ad5f1",
      "tree": "38002e49ef27da1d2b54b95c5a91daca8d778190",
      "parents": [
        "80708a99e2bc82868c26de89b7a4d86c0c4167af"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Thu Jun 25 14:17:39 2015 +0100"
      },
      "committer": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Thu Jun 25 14:17:39 2015 +0100"
      },
      "message": "Distinct User-Agent for the replicator\n\ncloses COUCHDB-2728\n"
    },
    {
      "commit": "80708a99e2bc82868c26de89b7a4d86c0c4167af",
      "tree": "2388f1b72dafc144f7a0a0b9a0510d837b996197",
      "parents": [
        "9d010db16eb172a066c3fa5dc08b904516581dd7"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Tue May 26 16:04:24 2015 +0100"
      },
      "committer": {
        "name": "Mike Wallace",
        "email": "mikewallace@apache.org",
        "time": "Fri Jun 05 17:20:26 2015 +0100"
      },
      "message": "Infinity timeout, just like all the others :(\n\nThis is a cherry-pick of:\n\nhttps://github.com/cloudant/couch_replicator/commit/e947b392db1eb2de22aac4a4fa12da118fe114b3\n"
    },
    {
      "commit": "9d010db16eb172a066c3fa5dc08b904516581dd7",
      "tree": "e94d72ea75364c7b44dfde17227e2404b145357c",
      "parents": [
        "86d7716985d92b2d1b9a6c070a87464f917c4aa9"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Thu May 21 14:08:42 2015 +0100"
      },
      "committer": {
        "name": "Mike Wallace",
        "email": "mikewallace@apache.org",
        "time": "Fri Jun 05 17:20:26 2015 +0100"
      },
      "message": "continue jobs that aren\u0027t _replicator docs\n\nThis is a cherry-pick of:\n\nhttps://github.com/cloudant/couch_replicator/commit/ff1ab1b840019601c3e3e04a1d931db6f2ccd2d1\n"
    },
    {
      "commit": "86d7716985d92b2d1b9a6c070a87464f917c4aa9",
      "tree": "ce39813db0d12e50ae61b122b8a65f51373f9b0c",
      "parents": [
        "8a3af420a79a1a071647450a8e9e1d2f8cf3532e"
      ],
      "author": {
        "name": "Paul J. Davis",
        "email": "paul.joseph.davis@gmail.com",
        "time": "Thu May 21 10:02:53 2015 -0500"
      },
      "committer": {
        "name": "Mike Wallace",
        "email": "mikewallace@apache.org",
        "time": "Fri Jun 05 17:20:26 2015 +0100"
      },
      "message": "Fix stream cleanup timeouts\n\nThe first part of this is adding the `after 0` clause. The issue here is\nthat ibrowse sends the `ibrowse_async_response_end` message without\nwaiting for a call to `ibrowse:stream_next/1`. This means that the\ncontinuous changes feed may or may not get this message in\n`couch_replicator_httpc:accumulate_messages/3`. If it does then we would\nend up on an infinite timeout waiting for it. This was a typo in the\noriginal patch in that I meant to include it but forgot.\n\nThe second timeout is so that we don\u0027t end up halted waiting for a\nchanges request to finish. If it takes longer than 30s we just crash the\nreplication and let the manager restart things.\n\nBugzId: 47306\n\nThis is a cherry-pick of:\n\nhttps://github.com/cloudant/couch_replicator/commit/2caf39040e4e50c38a7758d4d09e7a8b22ea92d4\n"
    },
    {
      "commit": "8a3af420a79a1a071647450a8e9e1d2f8cf3532e",
      "tree": "b4144c7b6f9f1e42c67619eec0f3cb3b15fea23c",
      "parents": [
        "5ee42e16b60c39135b7540cd23ab070aa1cd062a"
      ],
      "author": {
        "name": "Paul J. Davis",
        "email": "paul.joseph.davis@gmail.com",
        "time": "Wed May 20 17:26:59 2015 -0500"
      },
      "committer": {
        "name": "Mike Wallace",
        "email": "mikewallace@apache.org",
        "time": "Fri Jun 05 17:20:26 2015 +0100"
      },
      "message": "Be more explicit on values of ?STREAM_STATUS\n\nAlso I should add a note about how the changes ending due to a throw\nwhen processing the last_seq leads to the un-consumed stream messages.\n\nThis is a cherry-pick of:\n\nhttps://github.com/cloudant/couch_replicator/commit/20d11c7d342ea77ffd5384d75e9cd570cbcbf5ba\n"
    },
    {
      "commit": "5ee42e16b60c39135b7540cd23ab070aa1cd062a",
      "tree": "c2c27672583ec941003e297362b1e0a80e54db1c",
      "parents": [
        "ce1934f080387bfba287c1c2863b611e1d030f00"
      ],
      "author": {
        "name": "Paul J. Davis",
        "email": "paul.joseph.davis@gmail.com",
        "time": "Wed May 20 17:04:31 2015 -0500"
      },
      "committer": {
        "name": "Mike Wallace",
        "email": "mikewallace@apache.org",
        "time": "Fri Jun 05 17:20:26 2015 +0100"
      },
      "message": "Ensure that ibrowse streams are ended properly\n\nI found a situation where we had live lock on a running application due\nto an ibrowse request that hadn\u0027t been properly terminated. This\nmanifested as a cesation of updates to the _active_tasks information.\nDebugging this lead me to see that the main couch_replicator pid was\nstuck on a call to get_pending_changes. This call was stuck because the\nibrowse_http_client process being used was stuck waiting for a changes\nrequest to complete.\n\nThis changes request as it turns out had been abandoned by the\ncouch_replicator_changes_reader. The changes reader was then stuck\ntrying to do a gen_server:call/2 back to the main couch_replicator\nprocess with the report_seq_done message.\n\nGiven all this, it became apparent that the changes feed improperly\nending its ibrowse streams was the underlying culprit. Issuing a call to\nibrowse:stream_next/1 with the abandoned ibrowse stream id resulted in\nthe replication resuming.\n\nThis bug was introduced in this commit:\nbfa020b43be20c54ab166c51f5c6e55c34d844c2\n\nBugzId: 47306\n\nThis is a cherry-pick of:\n\nhttps://github.com/cloudant/couch_replicator/commit/f9db37a9b293f5f078681e7539fd35a92eb3adec\n"
    },
    {
      "commit": "ce1934f080387bfba287c1c2863b611e1d030f00",
      "tree": "0c91cff9a1bb48942c0141592ef6baa3db987b88",
      "parents": [
        "fb4da8d3fec9874f3f96db2cf6fb631ce4aee92d"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Fri May 15 16:31:24 2015 +0100"
      },
      "committer": {
        "name": "Mike Wallace",
        "email": "mikewallace@apache.org",
        "time": "Fri Jun 05 17:20:26 2015 +0100"
      },
      "message": "Cleanly stop replication at checkpoint time if no longer owner\n\nThis is a cherry-pick of:\n\nhttps://github.com/cloudant/couch_replicator/commit/e5ef7c8a0ee2566b9cd4c02397ee94883d015fa0\n"
    },
    {
      "commit": "fb4da8d3fec9874f3f96db2cf6fb631ce4aee92d",
      "tree": "c33c418d90c33d9b14fd1f53384ae13534f86e23",
      "parents": [
        "89363ae52e06f8f7e5a82d2ebe106dc41622ce01"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Fri May 15 16:30:55 2015 +0100"
      },
      "committer": {
        "name": "Mike Wallace",
        "email": "mikewallace@apache.org",
        "time": "Fri Jun 05 17:20:26 2015 +0100"
      },
      "message": "Log when node up/down events occur\n\nThis is a cherry-pick of:\n\nhttps://github.com/cloudant/couch_replicator/commit/d40bb6f2e603a7c81f777cc1c4c200ad34c3db42\n"
    },
    {
      "commit": "89363ae52e06f8f7e5a82d2ebe106dc41622ce01",
      "tree": "266758ce5e4f7ac16f709edf0b7913baea0e6ac1",
      "parents": [
        "8d69019b1e4fbaaf425fec8a30542dfee41a5cf1"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Fri May 15 16:30:34 2015 +0100"
      },
      "committer": {
        "name": "Mike Wallace",
        "email": "mikewallace@apache.org",
        "time": "Fri Jun 05 17:20:20 2015 +0100"
      },
      "message": "Return owner to improve logging output\n\nThis is a cherry-pick of:\n\nhttps://github.com/cloudant/couch_replicator/commit/3287da36a24b5d061a64cc93814f2f4580fdd4f9\n\nConflicts:\n\tsrc/couch_replicator_manager.erl\n"
    },
    {
      "commit": "8d69019b1e4fbaaf425fec8a30542dfee41a5cf1",
      "tree": "699f793ed163f09a6d4a81380f9eb74dbaf88150",
      "parents": [
        "5b630ff82b35b713941db094bef7a7beb6af66f1"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Wed May 13 19:40:55 2015 +0100"
      },
      "committer": {
        "name": "Mike Wallace",
        "email": "mikewallace@apache.org",
        "time": "Fri Jun 05 17:20:20 2015 +0100"
      },
      "message": "Ensure Live node set is consistent with up/down messages\n\nBugzID: 46617\n\nThis is a cherry-pick of:\n\nhttps://github.com/cloudant/couch_replicator/commit/2418c26b0fa7cffb97c2d8348654c42d6a0f1a06\n\nConflicts:\n\tsrc/couch_replicator_manager.erl\n"
    },
    {
      "commit": "5b630ff82b35b713941db094bef7a7beb6af66f1",
      "tree": "e53ec1ec0d1f17cf40bdab88692eb42e0b740433",
      "parents": [
        "362b3fd490d00015ea13fe24b62b925c1acb6ea5"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Wed Dec 03 12:14:10 2014 +0000"
      },
      "committer": {
        "name": "Mike Wallace",
        "email": "mikewallace@apache.org",
        "time": "Fri Jun 05 17:20:15 2015 +0100"
      },
      "message": "delay and splay replication starts\n\nThis is a cherry-pick of:\n\nhttps://github.com/cloudant/couch_replicator/commit/d279150d959cfd46cbd77c5dd17f14d6dc3d0291\n"
    },
    {
      "commit": "362b3fd490d00015ea13fe24b62b925c1acb6ea5",
      "tree": "48b451aef25ded7341c0c524631a54eccec690ff",
      "parents": [
        "2e6d5c1a6a74629509c247b620a877ddfce1daf5"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Wed Dec 03 11:41:48 2014 +0000"
      },
      "committer": {
        "name": "Mike Wallace",
        "email": "mikewallace@apache.org",
        "time": "Fri Jun 05 17:20:07 2015 +0100"
      },
      "message": "Verify that url really points to a database\n\nThis is a cherry-pick of:\n\nhttps://github.com/cloudant/couch_replicator/commit/e73714196936c345d54158e674ab36cab20beeec\n"
    },
    {
      "commit": "2e6d5c1a6a74629509c247b620a877ddfce1daf5",
      "tree": "768c6c51cf4205ba238bce3ece0553c89fe82401",
      "parents": [
        "dcb38869bdb1ed44bb90ed45bc993a6452be1cb6"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Wed Dec 03 11:30:51 2014 +0000"
      },
      "committer": {
        "name": "Mike Wallace",
        "email": "mikewallace@apache.org",
        "time": "Tue Jun 02 17:43:07 2015 +0100"
      },
      "message": "Remove anonymous fun when starting replications\n\nThis is a cherry-pick of:\n\nhttps://github.com/cloudant/couch_replicator/commit/faa28a6e7f5b460b1d3ca2f77b00ab7d5371021d\n"
    },
    {
      "commit": "dcb38869bdb1ed44bb90ed45bc993a6452be1cb6",
      "tree": "77a67a1eef758e97eba9028a0e9138ae728db2b5",
      "parents": [
        "bbab85b9f9674a809b2ec1d044beffed20396eae"
      ],
      "author": {
        "name": "Robert Newson",
        "email": "rnewson@apache.org",
        "time": "Mon Dec 01 11:11:00 2014 +0000"
      },
      "committer": {
        "name": "Mike Wallace",
        "email": "mikewallace@apache.org",
        "time": "Tue Jun 02 17:43:00 2015 +0100"
      },
      "message": "Use randomized, truncated exponential backoff in event of conflict\n\nBugzID: 42053\n\nThis is a cherry-pick of:\n\nhttps://github.com/cloudant/couch_replicator/commit/6e8fbb6a3f2622c14ae605c18ec54cbad7d389f3\n\nConflicts:\n\tsrc/couch_replicator_manager.erl\n"
    }
  ],
  "next": "bbab85b9f9674a809b2ec1d044beffed20396eae"
}
