{"action":"created","issue":{"url":"https://api.github.com/repos/couchbase/sync_gateway/issues/959","labels_url":"https://api.github.com/repos/couchbase/sync_gateway/issues/959/labels{/name}","comments_url":"https://api.github.com/repos/couchbase/sync_gateway/issues/959/comments","events_url":"https://api.github.com/repos/couchbase/sync_gateway/issues/959/events","html_url":"https://github.com/couchbase/sync_gateway/issues/959","id":92587485,"number":959,"title":"Sync Gateway bucket shadowing crashes with error 'panic: parent id \"xxx-xxxx\" is missing'","user":{"login":"joshblour","id":1440796,"avatar_url":"https://avatars.githubusercontent.com/u/1440796?v=3","gravatar_id":"","url":"https://api.github.com/users/joshblour","html_url":"https://github.com/joshblour","followers_url":"https://api.github.com/users/joshblour/followers","following_url":"https://api.github.com/users/joshblour/following{/other_user}","gists_url":"https://api.github.com/users/joshblour/gists{/gist_id}","starred_url":"https://api.github.com/users/joshblour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshblour/subscriptions","organizations_url":"https://api.github.com/users/joshblour/orgs","repos_url":"https://api.github.com/users/joshblour/repos","events_url":"https://api.github.com/users/joshblour/events{/privacy}","received_events_url":"https://api.github.com/users/joshblour/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/couchbase/sync_gateway/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/couchbase/sync_gateway/labels/docs","name":"docs","color":"fad8c7"},{"url":"https://api.github.com/repos/couchbase/sync_gateway/labels/review","name":"review","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"tleyden","id":296876,"avatar_url":"https://avatars.githubusercontent.com/u/296876?v=3","gravatar_id":"","url":"https://api.github.com/users/tleyden","html_url":"https://github.com/tleyden","followers_url":"https://api.github.com/users/tleyden/followers","following_url":"https://api.github.com/users/tleyden/following{/other_user}","gists_url":"https://api.github.com/users/tleyden/gists{/gist_id}","starred_url":"https://api.github.com/users/tleyden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tleyden/subscriptions","organizations_url":"https://api.github.com/users/tleyden/orgs","repos_url":"https://api.github.com/users/tleyden/repos","events_url":"https://api.github.com/users/tleyden/events{/privacy}","received_events_url":"https://api.github.com/users/tleyden/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/couchbase/sync_gateway/milestones/12","html_url":"https://github.com/couchbase/sync_gateway/milestones/1.2.0","labels_url":"https://api.github.com/repos/couchbase/sync_gateway/milestones/12/labels","id":771891,"number":12,"title":"1.2.0","description":"","creator":{"login":"jessliu","id":4998909,"avatar_url":"https://avatars.githubusercontent.com/u/4998909?v=3","gravatar_id":"","url":"https://api.github.com/users/jessliu","html_url":"https://github.com/jessliu","followers_url":"https://api.github.com/users/jessliu/followers","following_url":"https://api.github.com/users/jessliu/following{/other_user}","gists_url":"https://api.github.com/users/jessliu/gists{/gist_id}","starred_url":"https://api.github.com/users/jessliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jessliu/subscriptions","organizations_url":"https://api.github.com/users/jessliu/orgs","repos_url":"https://api.github.com/users/jessliu/repos","events_url":"https://api.github.com/users/jessliu/events{/privacy}","received_events_url":"https://api.github.com/users/jessliu/received_events","type":"User","site_admin":false},"open_issues":87,"closed_issues":33,"state":"open","created_at":"2014-08-29T16:34:15Z","updated_at":"2015-08-03T18:38:08Z","due_on":null,"closed_at":null},"comments":20,"created_at":"2015-07-02T09:00:34Z","updated_at":"2015-08-03T22:31:40Z","closed_at":null,"body":"Sync Gateway crashes with error 'panic: parent id \"xxx-xxxx\" is missing'\r\n\r\nTo trigger this error I have the revs_limit set to 3 and I'm updating a document once a second.\r\n\r\nFull crash log here: https://gist.github.com/joshblour/59058ac4e8f9a5dd900d\r\n\r\nYou can reproduce it with my modified version of helloCBL here: https://github.com/joshblour/couchbase-lite-tutorial-ios/tree/sync_rapid_updates\r\nI've added continuous push & pull replications and a timer to update the document once a second.\r\n\r\nI'm running sync_gateway version 1.1.0-26  on my local machine with the following config:\r\n````\r\n{\r\n        \"interface\":\":5984\",\r\n        \"adminInterface\":\":5985\",\r\n        \"log\":[\"REST\"],\r\n        \"verbose\":\"true\",\r\n        \"databases\":{\r\n                \"sync_gateway\" :{\r\n                        \"server\":\"http://localhost:8091\",\r\n                        \"revs_limit\" : 3,\r\n\t\t\t\"users\": { \"GUEST\": { \"disabled\": false, \"admin_channels\": [\"*\"] } },\r\n                        \"bucket\": \"sync_gateway\",\r\n                        \"shadow\": {\r\n                                \"server\": \"http://localhost:8091\",\r\n                                \"bucket\": \"default\"\r\n                        },\r\n                        \"sync\":`function(doc){\r\n                                 if (doc.deleted) {\r\n                                        channel(\"deleted\")\r\n                                } else if (doc.isExpired) {\r\n                                        channel(\"expired\")\r\n                                } else {\r\n                                        channel(\"active\")\r\n                                }\r\n                        }`\r\n                }\r\n        }\r\n}\r\n````"},"comment":{"url":"https://api.github.com/repos/couchbase/sync_gateway/issues/comments/127422197","html_url":"https://github.com/couchbase/sync_gateway/issues/959#issuecomment-127422197","issue_url":"https://api.github.com/repos/couchbase/sync_gateway/issues/959","id":127422197,"user":{"login":"JeffThomasWriter","id":12157466,"avatar_url":"https://avatars.githubusercontent.com/u/12157466?v=3","gravatar_id":"","url":"https://api.github.com/users/JeffThomasWriter","html_url":"https://github.com/JeffThomasWriter","followers_url":"https://api.github.com/users/JeffThomasWriter/followers","following_url":"https://api.github.com/users/JeffThomasWriter/following{/other_user}","gists_url":"https://api.github.com/users/JeffThomasWriter/gists{/gist_id}","starred_url":"https://api.github.com/users/JeffThomasWriter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeffThomasWriter/subscriptions","organizations_url":"https://api.github.com/users/JeffThomasWriter/orgs","repos_url":"https://api.github.com/users/JeffThomasWriter/repos","events_url":"https://api.github.com/users/JeffThomasWriter/events{/privacy}","received_events_url":"https://api.github.com/users/JeffThomasWriter/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T22:31:39Z","updated_at":"2015-08-03T22:31:39Z","body":"I am working on the config parameters section now. Is this too much to add? Suggestions? Thanks.\nrevsLimit\tinteger\tMaximum depth to which a document's revision tree can grow\n\nNote:If you are using bucket shadowing, setting revsLimit to a value that is too small relative to the frequency of document revisions can have negative consequences. Bucket shadowing needs the revision history to be maintained until pending revisions are reconciled. We recommend that you estimate the maximum update frequency in documents per second (for example, one per second), assume that 10 seconds are needed for documents to be available to the bucket shadower, and then add some slack (for example, set the revsLimit to 20."}}