{"action":"created","comment":{"url":"https://api.github.com/repos/ravendb/ravendb/pulls/comments/188287066","pull_request_review_id":120230623,"id":188287066,"diff_hunk":"@@ -655,5 +656,49 @@ public void Add(DocumentItem document)\n                 Documents.Add(document);\n             }\n         }\n+\n+        private class CounterActions : ICounterActions\n+        {\n+            private readonly DocumentDatabase _database;\n+\n+            public CounterActions(DocumentDatabase database)\n+            {\n+                _database = database;\n+            }\n+\n+            public void WriteCounter(CounterDetail counterDetail)\n+            {\n+                AsyncHelpers.RunSync(() => PutCounter(counterDetail));\n+            }\n+\n+            private async Task PutCounter(CounterDetail counterDetail)\n+            {\n+                await _database.TxMerger.Enqueue(new MergedPutCounterCommand(_database, counterDetail));","path":"src/Raven.Server/Smuggler/Documents/DatabaseDestination.cs","position":96,"original_position":96,"commit_id":"8245b3636ed252879391ede9edec520a9853b397","original_commit_id":"8245b3636ed252879391ede9edec520a9853b397","user":{"login":"ayende","id":116915,"avatar_url":"https://avatars3.githubusercontent.com/u/116915?v=4","gravatar_id":"","url":"https://api.github.com/users/ayende","html_url":"https://github.com/ayende","followers_url":"https://api.github.com/users/ayende/followers","following_url":"https://api.github.com/users/ayende/following{/other_user}","gists_url":"https://api.github.com/users/ayende/gists{/gist_id}","starred_url":"https://api.github.com/users/ayende/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayende/subscriptions","organizations_url":"https://api.github.com/users/ayende/orgs","repos_url":"https://api.github.com/users/ayende/repos","events_url":"https://api.github.com/users/ayende/events{/privacy}","received_events_url":"https://api.github.com/users/ayende/received_events","type":"User","site_admin":false},"body":"Do we really want to do it on _every single counter_? Why not batch it?","created_at":"2018-05-15T13:31:20Z","updated_at":"2018-05-15T13:35:18Z","html_url":"https://github.com/ravendb/ravendb/pull/6184#discussion_r188287066","pull_request_url":"https://api.github.com/repos/ravendb/ravendb/pulls/6184","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ravendb/ravendb/pulls/comments/188287066"},"html":{"href":"https://github.com/ravendb/ravendb/pull/6184#discussion_r188287066"},"pull_request":{"href":"https://api.github.com/repos/ravendb/ravendb/pulls/6184"}}},"pull_request":{"url":"https://api.github.com/repos/ravendb/ravendb/pulls/6184","id":188120965,"html_url":"https://github.com/ravendb/ravendb/pull/6184","diff_url":"https://github.com/ravendb/ravendb/pull/6184.diff","patch_url":"https://github.com/ravendb/ravendb/pull/6184.patch","issue_url":"https://api.github.com/repos/ravendb/ravendb/issues/6184","number":6184,"state":"open","locked":false,"title":"[4.1] RavenDB-8113","user":{"login":"aviv86","id":23610777,"avatar_url":"https://avatars0.githubusercontent.com/u/23610777?v=4","gravatar_id":"","url":"https://api.github.com/users/aviv86","html_url":"https://github.com/aviv86","followers_url":"https://api.github.com/users/aviv86/followers","following_url":"https://api.github.com/users/aviv86/following{/other_user}","gists_url":"https://api.github.com/users/aviv86/gists{/gist_id}","starred_url":"https://api.github.com/users/aviv86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aviv86/subscriptions","organizations_url":"https://api.github.com/users/aviv86/orgs","repos_url":"https://api.github.com/users/aviv86/repos","events_url":"https://api.github.com/users/aviv86/events{/privacy}","received_events_url":"https://api.github.com/users/aviv86/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-15T13:03:26Z","updated_at":"2018-05-15T13:35:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"625c466cd286cad5bae1e88f8c58a6b0ccceb8f8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ravendb/ravendb/pulls/6184/commits","review_comments_url":"https://api.github.com/repos/ravendb/ravendb/pulls/6184/comments","review_comment_url":"https://api.github.com/repos/ravendb/ravendb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ravendb/ravendb/issues/6184/comments","statuses_url":"https://api.github.com/repos/ravendb/ravendb/statuses/8245b3636ed252879391ede9edec520a9853b397","head":{"label":"aviv86:RavenDB-8113-Counters","ref":"RavenDB-8113-Counters","sha":"8245b3636ed252879391ede9edec520a9853b397","user":{"login":"aviv86","id":23610777,"avatar_url":"https://avatars0.githubusercontent.com/u/23610777?v=4","gravatar_id":"","url":"https://api.github.com/users/aviv86","html_url":"https://github.com/aviv86","followers_url":"https://api.github.com/users/aviv86/followers","following_url":"https://api.github.com/users/aviv86/following{/other_user}","gists_url":"https://api.github.com/users/aviv86/gists{/gist_id}","starred_url":"https://api.github.com/users/aviv86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aviv86/subscriptions","organizations_url":"https://api.github.com/users/aviv86/orgs","repos_url":"https://api.github.com/users/aviv86/repos","events_url":"https://api.github.com/users/aviv86/events{/privacy}","received_events_url":"https://api.github.com/users/aviv86/received_events","type":"User","site_admin":false},"repo":{"id":74271618,"name":"ravendb","full_name":"aviv86/ravendb","owner":{"login":"aviv86","id":23610777,"avatar_url":"https://avatars0.githubusercontent.com/u/23610777?v=4","gravatar_id":"","url":"https://api.github.com/users/aviv86","html_url":"https://github.com/aviv86","followers_url":"https://api.github.com/users/aviv86/followers","following_url":"https://api.github.com/users/aviv86/following{/other_user}","gists_url":"https://api.github.com/users/aviv86/gists{/gist_id}","starred_url":"https://api.github.com/users/aviv86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aviv86/subscriptions","organizations_url":"https://api.github.com/users/aviv86/orgs","repos_url":"https://api.github.com/users/aviv86/repos","events_url":"https://api.github.com/users/aviv86/events{/privacy}","received_events_url":"https://api.github.com/users/aviv86/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aviv86/ravendb","description":"A linq enabled document database for .NET","fork":true,"url":"https://api.github.com/repos/aviv86/ravendb","forks_url":"https://api.github.com/repos/aviv86/ravendb/forks","keys_url":"https://api.github.com/repos/aviv86/ravendb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aviv86/ravendb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aviv86/ravendb/teams","hooks_url":"https://api.github.com/repos/aviv86/ravendb/hooks","issue_events_url":"https://api.github.com/repos/aviv86/ravendb/issues/events{/number}","events_url":"https://api.github.com/repos/aviv86/ravendb/events","assignees_url":"https://api.github.com/repos/aviv86/ravendb/assignees{/user}","branches_url":"https://api.github.com/repos/aviv86/ravendb/branches{/branch}","tags_url":"https://api.github.com/repos/aviv86/ravendb/tags","blobs_url":"https://api.github.com/repos/aviv86/ravendb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aviv86/ravendb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aviv86/ravendb/git/refs{/sha}","trees_url":"https://api.github.com/repos/aviv86/ravendb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aviv86/ravendb/statuses/{sha}","languages_url":"https://api.github.com/repos/aviv86/ravendb/languages","stargazers_url":"https://api.github.com/repos/aviv86/ravendb/stargazers","contributors_url":"https://api.github.com/repos/aviv86/ravendb/contributors","subscribers_url":"https://api.github.com/repos/aviv86/ravendb/subscribers","subscription_url":"https://api.github.com/repos/aviv86/ravendb/subscription","commits_url":"https://api.github.com/repos/aviv86/ravendb/commits{/sha}","git_commits_url":"https://api.github.com/repos/aviv86/ravendb/git/commits{/sha}","comments_url":"https://api.github.com/repos/aviv86/ravendb/comments{/number}","issue_comment_url":"https://api.github.com/repos/aviv86/ravendb/issues/comments{/number}","contents_url":"https://api.github.com/repos/aviv86/ravendb/contents/{+path}","compare_url":"https://api.github.com/repos/aviv86/ravendb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aviv86/ravendb/merges","archive_url":"https://api.github.com/repos/aviv86/ravendb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aviv86/ravendb/downloads","issues_url":"https://api.github.com/repos/aviv86/ravendb/issues{/number}","pulls_url":"https://api.github.com/repos/aviv86/ravendb/pulls{/number}","milestones_url":"https://api.github.com/repos/aviv86/ravendb/milestones{/number}","notifications_url":"https://api.github.com/repos/aviv86/ravendb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aviv86/ravendb/labels{/name}","releases_url":"https://api.github.com/repos/aviv86/ravendb/releases{/id}","deployments_url":"https://api.github.com/repos/aviv86/ravendb/deployments","created_at":"2016-11-20T12:10:32Z","updated_at":"2018-04-25T08:33:05Z","pushed_at":"2018-05-15T12:58:50Z","git_url":"git://github.com/aviv86/ravendb.git","ssh_url":"git@github.com:aviv86/ravendb.git","clone_url":"https://github.com/aviv86/ravendb.git","svn_url":"https://github.com/aviv86/ravendb","homepage":"http://ravendb.net","size":435768,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"v4.0"}},"base":{"label":"ravendb:v4.1","ref":"v4.1","sha":"fcc4ff233fcf9bcc08c0bca039351743cc2119c7","user":{"login":"ravendb","id":213792,"avatar_url":"https://avatars0.githubusercontent.com/u/213792?v=4","gravatar_id":"","url":"https://api.github.com/users/ravendb","html_url":"https://github.com/ravendb","followers_url":"https://api.github.com/users/ravendb/followers","following_url":"https://api.github.com/users/ravendb/following{/other_user}","gists_url":"https://api.github.com/users/ravendb/gists{/gist_id}","starred_url":"https://api.github.com/users/ravendb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ravendb/subscriptions","organizations_url":"https://api.github.com/users/ravendb/orgs","repos_url":"https://api.github.com/users/ravendb/repos","events_url":"https://api.github.com/users/ravendb/events{/privacy}","received_events_url":"https://api.github.com/users/ravendb/received_events","type":"Organization","site_admin":false},"repo":{"id":542714,"name":"ravendb","full_name":"ravendb/ravendb","owner":{"login":"ravendb","id":213792,"avatar_url":"https://avatars0.githubusercontent.com/u/213792?v=4","gravatar_id":"","url":"https://api.github.com/users/ravendb","html_url":"https://github.com/ravendb","followers_url":"https://api.github.com/users/ravendb/followers","following_url":"https://api.github.com/users/ravendb/following{/other_user}","gists_url":"https://api.github.com/users/ravendb/gists{/gist_id}","starred_url":"https://api.github.com/users/ravendb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ravendb/subscriptions","organizations_url":"https://api.github.com/users/ravendb/orgs","repos_url":"https://api.github.com/users/ravendb/repos","events_url":"https://api.github.com/users/ravendb/events{/privacy}","received_events_url":"https://api.github.com/users/ravendb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ravendb/ravendb","description":"ACID Document Database","fork":false,"url":"https://api.github.com/repos/ravendb/ravendb","forks_url":"https://api.github.com/repos/ravendb/ravendb/forks","keys_url":"https://api.github.com/repos/ravendb/ravendb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ravendb/ravendb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ravendb/ravendb/teams","hooks_url":"https://api.github.com/repos/ravendb/ravendb/hooks","issue_events_url":"https://api.github.com/repos/ravendb/ravendb/issues/events{/number}","events_url":"https://api.github.com/repos/ravendb/ravendb/events","assignees_url":"https://api.github.com/repos/ravendb/ravendb/assignees{/user}","branches_url":"https://api.github.com/repos/ravendb/ravendb/branches{/branch}","tags_url":"https://api.github.com/repos/ravendb/ravendb/tags","blobs_url":"https://api.github.com/repos/ravendb/ravendb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ravendb/ravendb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ravendb/ravendb/git/refs{/sha}","trees_url":"https://api.github.com/repos/ravendb/ravendb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ravendb/ravendb/statuses/{sha}","languages_url":"https://api.github.com/repos/ravendb/ravendb/languages","stargazers_url":"https://api.github.com/repos/ravendb/ravendb/stargazers","contributors_url":"https://api.github.com/repos/ravendb/ravendb/contributors","subscribers_url":"https://api.github.com/repos/ravendb/ravendb/subscribers","subscription_url":"https://api.github.com/repos/ravendb/ravendb/subscription","commits_url":"https://api.github.com/repos/ravendb/ravendb/commits{/sha}","git_commits_url":"https://api.github.com/repos/ravendb/ravendb/git/commits{/sha}","comments_url":"https://api.github.com/repos/ravendb/ravendb/comments{/number}","issue_comment_url":"https://api.github.com/repos/ravendb/ravendb/issues/comments{/number}","contents_url":"https://api.github.com/repos/ravendb/ravendb/contents/{+path}","compare_url":"https://api.github.com/repos/ravendb/ravendb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ravendb/ravendb/merges","archive_url":"https://api.github.com/repos/ravendb/ravendb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ravendb/ravendb/downloads","issues_url":"https://api.github.com/repos/ravendb/ravendb/issues{/number}","pulls_url":"https://api.github.com/repos/ravendb/ravendb/pulls{/number}","milestones_url":"https://api.github.com/repos/ravendb/ravendb/milestones{/number}","notifications_url":"https://api.github.com/repos/ravendb/ravendb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ravendb/ravendb/labels{/name}","releases_url":"https://api.github.com/repos/ravendb/ravendb/releases{/id}","deployments_url":"https://api.github.com/repos/ravendb/ravendb/deployments","created_at":"2010-03-02T11:05:30Z","updated_at":"2018-05-15T12:43:45Z","pushed_at":"2018-05-15T13:33:32Z","git_url":"git://github.com/ravendb/ravendb.git","ssh_url":"git@github.com:ravendb/ravendb.git","clone_url":"https://github.com/ravendb/ravendb.git","svn_url":"https://github.com/ravendb/ravendb","homepage":"https://ravendb.net","size":437595,"stargazers_count":1917,"watchers_count":1917,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":679,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":679,"open_issues":6,"watchers":1917,"default_branch":"v4.0"}},"_links":{"self":{"href":"https://api.github.com/repos/ravendb/ravendb/pulls/6184"},"html":{"href":"https://github.com/ravendb/ravendb/pull/6184"},"issue":{"href":"https://api.github.com/repos/ravendb/ravendb/issues/6184"},"comments":{"href":"https://api.github.com/repos/ravendb/ravendb/issues/6184/comments"},"review_comments":{"href":"https://api.github.com/repos/ravendb/ravendb/pulls/6184/comments"},"review_comment":{"href":"https://api.github.com/repos/ravendb/ravendb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ravendb/ravendb/pulls/6184/commits"},"statuses":{"href":"https://api.github.com/repos/ravendb/ravendb/statuses/8245b3636ed252879391ede9edec520a9853b397"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ayende"}}