{"action":"created","comment":{"url":"https://api.github.com/repos/couchbase/couchbase-lite-net/pulls/comments/295042243","pull_request_review_id":251378140,"id":295042243,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI5NTA0MjI0Mw==","diff_hunk":"@@ -458,42 +473,53 @@ private bool HandleError(C4Error error)\n             return true;\n         }\n \n-        private void OnDocEnded(List<ReplicatedDocument> replications, bool pushing)\n+        private void OnDocEnded(ConcurrentBag<ReplicatedDocument> replications, bool pushing)\n         {\n             if (_disposed) {\n                 return;\n             }\n \n-            for(int i = 0; i < replications.Count; i++) {\n+            while (!replications.IsEmpty) {\n+                _conflictTasks.Add(Task.Run(() =>\n+                {\n+                    ReplicatedDocument replication;\n+                    if (replications.TryTake(out replication)) {\n+                        try {\n+                            Config.Database.ResolveConflict(replication.Id, Config.ConflictResolver);\n+                            replication = replication.ClearError();\n+                        } catch (Exception e) {\n+                            C4Error error;\n+                            if(e.GetBaseException() is CouchbaseException) {","path":"src/Couchbase.Lite.Shared/API/Sync/Replicator.cs","position":93,"original_position":78,"commit_id":"59fb129b3a6c060b3ed728572f094943f7a4005e","original_commit_id":"4dd155b34830aeefa4926ef36445762385132ee7","user":{"login":"borrrden","id":2470288,"node_id":"MDQ6VXNlcjI0NzAyODg=","avatar_url":"https://avatars0.githubusercontent.com/u/2470288?v=4","gravatar_id":"","url":"https://api.github.com/users/borrrden","html_url":"https://github.com/borrrden","followers_url":"https://api.github.com/users/borrrden/followers","following_url":"https://api.github.com/users/borrrden/following{/other_user}","gists_url":"https://api.github.com/users/borrrden/gists{/gist_id}","starred_url":"https://api.github.com/users/borrrden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borrrden/subscriptions","organizations_url":"https://api.github.com/users/borrrden/orgs","repos_url":"https://api.github.com/users/borrrden/repos","events_url":"https://api.github.com/users/borrrden/events{/privacy}","received_events_url":"https://api.github.com/users/borrrden/received_events","type":"User","site_admin":false},"body":"Only CouchbaseLiteException will have C4 error codes.  The rest of the Couchbase exception family has different domain codes.","created_at":"2019-06-18T21:45:06Z","updated_at":"2019-06-18T21:53:49Z","html_url":"https://github.com/couchbase/couchbase-lite-net/pull/1164#discussion_r295042243","pull_request_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/pulls/1164","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/couchbase/couchbase-lite-net/pulls/comments/295042243"},"html":{"href":"https://github.com/couchbase/couchbase-lite-net/pull/1164#discussion_r295042243"},"pull_request":{"href":"https://api.github.com/repos/couchbase/couchbase-lite-net/pulls/1164"}}},"pull_request":{"url":"https://api.github.com/repos/couchbase/couchbase-lite-net/pulls/1164","id":286382574,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjg2MzgyNTc0","html_url":"https://github.com/couchbase/couchbase-lite-net/pull/1164","diff_url":"https://github.com/couchbase/couchbase-lite-net/pull/1164.diff","patch_url":"https://github.com/couchbase/couchbase-lite-net/pull/1164.patch","issue_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/issues/1164","number":1164,"state":"open","locked":false,"title":"Add additional conflict resolver tests","user":{"login":"Sandychuang8","id":16504419,"node_id":"MDQ6VXNlcjE2NTA0NDE5","avatar_url":"https://avatars1.githubusercontent.com/u/16504419?v=4","gravatar_id":"","url":"https://api.github.com/users/Sandychuang8","html_url":"https://github.com/Sandychuang8","followers_url":"https://api.github.com/users/Sandychuang8/followers","following_url":"https://api.github.com/users/Sandychuang8/following{/other_user}","gists_url":"https://api.github.com/users/Sandychuang8/gists{/gist_id}","starred_url":"https://api.github.com/users/Sandychuang8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sandychuang8/subscriptions","organizations_url":"https://api.github.com/users/Sandychuang8/orgs","repos_url":"https://api.github.com/users/Sandychuang8/repos","events_url":"https://api.github.com/users/Sandychuang8/events{/privacy}","received_events_url":"https://api.github.com/users/Sandychuang8/received_events","type":"User","site_admin":false},"body":"Add additional conflict resolver tests: TestConflictResolverWrongDocID, TestConflictResolverReturningBlob, and TestConflictResolverReturningBlobFromDifferentDB","created_at":"2019-06-08T06:01:31Z","updated_at":"2019-06-18T21:53:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c45018450fc720d9408ebfef48de9f0599c571d7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/pulls/1164/commits","review_comments_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/pulls/1164/comments","review_comment_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/pulls/comments{/number}","comments_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/issues/1164/comments","statuses_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/statuses/59fb129b3a6c060b3ed728572f094943f7a4005e","head":{"label":"couchbase:test/MoreConflictResolverTests","ref":"test/MoreConflictResolverTests","sha":"59fb129b3a6c060b3ed728572f094943f7a4005e","user":{"login":"couchbase","id":605755,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYwNTc1NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/605755?v=4","gravatar_id":"","url":"https://api.github.com/users/couchbase","html_url":"https://github.com/couchbase","followers_url":"https://api.github.com/users/couchbase/followers","following_url":"https://api.github.com/users/couchbase/following{/other_user}","gists_url":"https://api.github.com/users/couchbase/gists{/gist_id}","starred_url":"https://api.github.com/users/couchbase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/couchbase/subscriptions","organizations_url":"https://api.github.com/users/couchbase/orgs","repos_url":"https://api.github.com/users/couchbase/repos","events_url":"https://api.github.com/users/couchbase/events{/privacy}","received_events_url":"https://api.github.com/users/couchbase/received_events","type":"Organization","site_admin":false},"repo":{"id":13573524,"node_id":"MDEwOlJlcG9zaXRvcnkxMzU3MzUyNA==","name":"couchbase-lite-net","full_name":"couchbase/couchbase-lite-net","private":false,"owner":{"login":"couchbase","id":605755,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYwNTc1NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/605755?v=4","gravatar_id":"","url":"https://api.github.com/users/couchbase","html_url":"https://github.com/couchbase","followers_url":"https://api.github.com/users/couchbase/followers","following_url":"https://api.github.com/users/couchbase/following{/other_user}","gists_url":"https://api.github.com/users/couchbase/gists{/gist_id}","starred_url":"https://api.github.com/users/couchbase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/couchbase/subscriptions","organizations_url":"https://api.github.com/users/couchbase/orgs","repos_url":"https://api.github.com/users/couchbase/repos","events_url":"https://api.github.com/users/couchbase/events{/privacy}","received_events_url":"https://api.github.com/users/couchbase/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/couchbase/couchbase-lite-net","description":"A lightweight, document-oriented (NoSQL), syncable database engine for .NET","fork":false,"url":"https://api.github.com/repos/couchbase/couchbase-lite-net","forks_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/forks","keys_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/keys{/key_id}","collaborators_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/teams","hooks_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/hooks","issue_events_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/issues/events{/number}","events_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/events","assignees_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/assignees{/user}","branches_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/branches{/branch}","tags_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/tags","blobs_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/git/refs{/sha}","trees_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/git/trees{/sha}","statuses_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/statuses/{sha}","languages_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/languages","stargazers_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/stargazers","contributors_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/contributors","subscribers_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/subscribers","subscription_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/subscription","commits_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/commits{/sha}","git_commits_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/git/commits{/sha}","comments_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/comments{/number}","issue_comment_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/issues/comments{/number}","contents_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/contents/{+path}","compare_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/compare/{base}...{head}","merges_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/merges","archive_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/downloads","issues_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/issues{/number}","pulls_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/pulls{/number}","milestones_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/milestones{/number}","notifications_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/labels{/name}","releases_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/releases{/id}","deployments_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/deployments","created_at":"2013-10-14T21:18:36Z","updated_at":"2019-06-14T03:16:07Z","pushed_at":"2019-06-18T21:41:04Z","git_url":"git://github.com/couchbase/couchbase-lite-net.git","ssh_url":"git@github.com:couchbase/couchbase-lite-net.git","clone_url":"https://github.com/couchbase/couchbase-lite-net.git","svn_url":"https://github.com/couchbase/couchbase-lite-net","homepage":"http://developer.couchbase.com/mobile/","size":100148,"stargazers_count":332,"watchers_count":332,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":114,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":4,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":114,"open_issues":4,"watchers":332,"default_branch":"master"}},"base":{"label":"couchbase:master","ref":"master","sha":"bed225aed00f6533bf21cd04550ecaaf89fe1a99","user":{"login":"couchbase","id":605755,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYwNTc1NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/605755?v=4","gravatar_id":"","url":"https://api.github.com/users/couchbase","html_url":"https://github.com/couchbase","followers_url":"https://api.github.com/users/couchbase/followers","following_url":"https://api.github.com/users/couchbase/following{/other_user}","gists_url":"https://api.github.com/users/couchbase/gists{/gist_id}","starred_url":"https://api.github.com/users/couchbase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/couchbase/subscriptions","organizations_url":"https://api.github.com/users/couchbase/orgs","repos_url":"https://api.github.com/users/couchbase/repos","events_url":"https://api.github.com/users/couchbase/events{/privacy}","received_events_url":"https://api.github.com/users/couchbase/received_events","type":"Organization","site_admin":false},"repo":{"id":13573524,"node_id":"MDEwOlJlcG9zaXRvcnkxMzU3MzUyNA==","name":"couchbase-lite-net","full_name":"couchbase/couchbase-lite-net","private":false,"owner":{"login":"couchbase","id":605755,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYwNTc1NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/605755?v=4","gravatar_id":"","url":"https://api.github.com/users/couchbase","html_url":"https://github.com/couchbase","followers_url":"https://api.github.com/users/couchbase/followers","following_url":"https://api.github.com/users/couchbase/following{/other_user}","gists_url":"https://api.github.com/users/couchbase/gists{/gist_id}","starred_url":"https://api.github.com/users/couchbase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/couchbase/subscriptions","organizations_url":"https://api.github.com/users/couchbase/orgs","repos_url":"https://api.github.com/users/couchbase/repos","events_url":"https://api.github.com/users/couchbase/events{/privacy}","received_events_url":"https://api.github.com/users/couchbase/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/couchbase/couchbase-lite-net","description":"A lightweight, document-oriented (NoSQL), syncable database engine for .NET","fork":false,"url":"https://api.github.com/repos/couchbase/couchbase-lite-net","forks_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/forks","keys_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/keys{/key_id}","collaborators_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/teams","hooks_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/hooks","issue_events_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/issues/events{/number}","events_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/events","assignees_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/assignees{/user}","branches_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/branches{/branch}","tags_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/tags","blobs_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/git/refs{/sha}","trees_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/git/trees{/sha}","statuses_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/statuses/{sha}","languages_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/languages","stargazers_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/stargazers","contributors_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/contributors","subscribers_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/subscribers","subscription_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/subscription","commits_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/commits{/sha}","git_commits_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/git/commits{/sha}","comments_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/comments{/number}","issue_comment_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/issues/comments{/number}","contents_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/contents/{+path}","compare_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/compare/{base}...{head}","merges_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/merges","archive_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/downloads","issues_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/issues{/number}","pulls_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/pulls{/number}","milestones_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/milestones{/number}","notifications_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/labels{/name}","releases_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/releases{/id}","deployments_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/deployments","created_at":"2013-10-14T21:18:36Z","updated_at":"2019-06-14T03:16:07Z","pushed_at":"2019-06-18T21:41:04Z","git_url":"git://github.com/couchbase/couchbase-lite-net.git","ssh_url":"git@github.com:couchbase/couchbase-lite-net.git","clone_url":"https://github.com/couchbase/couchbase-lite-net.git","svn_url":"https://github.com/couchbase/couchbase-lite-net","homepage":"http://developer.couchbase.com/mobile/","size":100148,"stargazers_count":332,"watchers_count":332,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":114,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":4,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":114,"open_issues":4,"watchers":332,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/couchbase/couchbase-lite-net/pulls/1164"},"html":{"href":"https://github.com/couchbase/couchbase-lite-net/pull/1164"},"issue":{"href":"https://api.github.com/repos/couchbase/couchbase-lite-net/issues/1164"},"comments":{"href":"https://api.github.com/repos/couchbase/couchbase-lite-net/issues/1164/comments"},"review_comments":{"href":"https://api.github.com/repos/couchbase/couchbase-lite-net/pulls/1164/comments"},"review_comment":{"href":"https://api.github.com/repos/couchbase/couchbase-lite-net/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/couchbase/couchbase-lite-net/pulls/1164/commits"},"statuses":{"href":"https://api.github.com/repos/couchbase/couchbase-lite-net/statuses/59fb129b3a6c060b3ed728572f094943f7a4005e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"borrrden"}}