{"action":"created","comment":{"url":"https://api.github.com/repos/infinispan/infinispan/pulls/comments/27209207","id":27209207,"diff_hunk":"@@ -47,38 +46,16 @@ public int size() {\n \n    @Override\n    public L acquireLock(final Object lockOwner, final Object key, final long timeout, final TimeUnit unit) throws InterruptedException {\n-      final ByRef<Boolean> lockAcquired = ByRef.create(Boolean.FALSE);\n-      L lock = locks.compute(key, new EquivalentConcurrentHashMapV8.BiFun<Object, L, L>() {\n-         @Override\n-         public L apply(Object key, L lock) {\n-            // This happens atomically in the CHM\n-            if (lock == null) {\n-               Log log = getLog();\n-               if (log.isTraceEnabled())\n-                  log.tracef(\"Creating and acquiring new lock instance for key %s\", toStr(key));\n-\n-               lock = newLock();\n-               // Since this is a new lock, it is certainly uncontended.\n-               lock(lock, lockOwner);\n-               lockAcquired.set(Boolean.TRUE);\n-               return lock;\n-            }\n-\n-            // No need to worry about concurrent updates - there can't be a release in progress at the same time\n-            int refCount = lock.getReferenceCounter().incrementAndGet();\n-            if (refCount <= 1) {\n-               throw new IllegalStateException(\"Lock \" + key + \" acquired although it should have been removed: \" + lock);\n-            }\n-            return lock;\n-         }\n-      });\n+      //final ByRef<Boolean> lockAcquired = ByRef.create(Boolean.FALSE);","path":"core/src/main/java/org/infinispan/util/concurrent/locks/containers/AbstractPerEntryLockContainer.java","position":51,"original_position":51,"commit_id":"6c6b24f145ef11c920be4f7cbfcd79493370ddd7","original_commit_id":"6c6b24f145ef11c920be4f7cbfcd79493370ddd7","user":{"login":"wburns","id":648175,"avatar_url":"https://avatars.githubusercontent.com/u/648175?v=3","gravatar_id":"","url":"https://api.github.com/users/wburns","html_url":"https://github.com/wburns","followers_url":"https://api.github.com/users/wburns/followers","following_url":"https://api.github.com/users/wburns/following{/other_user}","gists_url":"https://api.github.com/users/wburns/gists{/gist_id}","starred_url":"https://api.github.com/users/wburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wburns/subscriptions","organizations_url":"https://api.github.com/users/wburns/orgs","repos_url":"https://api.github.com/users/wburns/repos","events_url":"https://api.github.com/users/wburns/events{/privacy}","received_events_url":"https://api.github.com/users/wburns/received_events","type":"User","site_admin":false},"body":"No longer needed.","created_at":"2015-03-26T12:51:43Z","updated_at":"2015-03-26T12:51:43Z","html_url":"https://github.com/infinispan/infinispan/pull/3342#discussion_r27209207","pull_request_url":"https://api.github.com/repos/infinispan/infinispan/pulls/3342","_links":{"self":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/comments/27209207"},"html":{"href":"https://github.com/infinispan/infinispan/pull/3342#discussion_r27209207"},"pull_request":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/3342"}}},"pull_request":{"url":"https://api.github.com/repos/infinispan/infinispan/pulls/3342","id":31997525,"html_url":"https://github.com/infinispan/infinispan/pull/3342","diff_url":"https://github.com/infinispan/infinispan/pull/3342.diff","patch_url":"https://github.com/infinispan/infinispan/pull/3342.patch","issue_url":"https://api.github.com/repos/infinispan/infinispan/issues/3342","number":3342,"state":"open","locked":false,"title":"ISPN-5329 Reduce number of allocations","user":{"login":"rvansa","id":2167869,"avatar_url":"https://avatars.githubusercontent.com/u/2167869?v=3","gravatar_id":"","url":"https://api.github.com/users/rvansa","html_url":"https://github.com/rvansa","followers_url":"https://api.github.com/users/rvansa/followers","following_url":"https://api.github.com/users/rvansa/following{/other_user}","gists_url":"https://api.github.com/users/rvansa/gists{/gist_id}","starred_url":"https://api.github.com/users/rvansa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvansa/subscriptions","organizations_url":"https://api.github.com/users/rvansa/orgs","repos_url":"https://api.github.com/users/rvansa/repos","events_url":"https://api.github.com/users/rvansa/events{/privacy}","received_events_url":"https://api.github.com/users/rvansa/received_events","type":"User","site_admin":false},"body":"I have analyzed allocations during put() (into local cache) and removed some of the low-hanging fruits. Some of those could be already handled by escape analysis, but most of them cannot, IMO. Though, the difference between performance before and after was within the margin of error of the benchmark. \r\n\r\nYou can find both the benchmark and Byteman tooling for analysis at https://github.com/rvansa/benchmarks/tree/master/ispntest","created_at":"2015-03-26T08:33:53Z","updated_at":"2015-03-26T12:51:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e188e0bded1add3c9e7e16e5fd5b661c4feba2f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/infinispan/infinispan/pulls/3342/commits","review_comments_url":"https://api.github.com/repos/infinispan/infinispan/pulls/3342/comments","review_comment_url":"https://api.github.com/repos/infinispan/infinispan/pulls/comments{/number}","comments_url":"https://api.github.com/repos/infinispan/infinispan/issues/3342/comments","statuses_url":"https://api.github.com/repos/infinispan/infinispan/statuses/6c6b24f145ef11c920be4f7cbfcd79493370ddd7","head":{"label":"rvansa:t_5329","ref":"t_5329","sha":"6c6b24f145ef11c920be4f7cbfcd79493370ddd7","user":{"login":"rvansa","id":2167869,"avatar_url":"https://avatars.githubusercontent.com/u/2167869?v=3","gravatar_id":"","url":"https://api.github.com/users/rvansa","html_url":"https://github.com/rvansa","followers_url":"https://api.github.com/users/rvansa/followers","following_url":"https://api.github.com/users/rvansa/following{/other_user}","gists_url":"https://api.github.com/users/rvansa/gists{/gist_id}","starred_url":"https://api.github.com/users/rvansa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvansa/subscriptions","organizations_url":"https://api.github.com/users/rvansa/orgs","repos_url":"https://api.github.com/users/rvansa/repos","events_url":"https://api.github.com/users/rvansa/events{/privacy}","received_events_url":"https://api.github.com/users/rvansa/received_events","type":"User","site_admin":false},"repo":{"id":8481591,"name":"infinispan","full_name":"rvansa/infinispan","owner":{"login":"rvansa","id":2167869,"avatar_url":"https://avatars.githubusercontent.com/u/2167869?v=3","gravatar_id":"","url":"https://api.github.com/users/rvansa","html_url":"https://github.com/rvansa","followers_url":"https://api.github.com/users/rvansa/followers","following_url":"https://api.github.com/users/rvansa/following{/other_user}","gists_url":"https://api.github.com/users/rvansa/gists{/gist_id}","starred_url":"https://api.github.com/users/rvansa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvansa/subscriptions","organizations_url":"https://api.github.com/users/rvansa/orgs","repos_url":"https://api.github.com/users/rvansa/repos","events_url":"https://api.github.com/users/rvansa/events{/privacy}","received_events_url":"https://api.github.com/users/rvansa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rvansa/infinispan","description":"Infinispan is an open source data grid platform and highly scalable NoSQL cloud data store.","fork":true,"url":"https://api.github.com/repos/rvansa/infinispan","forks_url":"https://api.github.com/repos/rvansa/infinispan/forks","keys_url":"https://api.github.com/repos/rvansa/infinispan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rvansa/infinispan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rvansa/infinispan/teams","hooks_url":"https://api.github.com/repos/rvansa/infinispan/hooks","issue_events_url":"https://api.github.com/repos/rvansa/infinispan/issues/events{/number}","events_url":"https://api.github.com/repos/rvansa/infinispan/events","assignees_url":"https://api.github.com/repos/rvansa/infinispan/assignees{/user}","branches_url":"https://api.github.com/repos/rvansa/infinispan/branches{/branch}","tags_url":"https://api.github.com/repos/rvansa/infinispan/tags","blobs_url":"https://api.github.com/repos/rvansa/infinispan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rvansa/infinispan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rvansa/infinispan/git/refs{/sha}","trees_url":"https://api.github.com/repos/rvansa/infinispan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rvansa/infinispan/statuses/{sha}","languages_url":"https://api.github.com/repos/rvansa/infinispan/languages","stargazers_url":"https://api.github.com/repos/rvansa/infinispan/stargazers","contributors_url":"https://api.github.com/repos/rvansa/infinispan/contributors","subscribers_url":"https://api.github.com/repos/rvansa/infinispan/subscribers","subscription_url":"https://api.github.com/repos/rvansa/infinispan/subscription","commits_url":"https://api.github.com/repos/rvansa/infinispan/commits{/sha}","git_commits_url":"https://api.github.com/repos/rvansa/infinispan/git/commits{/sha}","comments_url":"https://api.github.com/repos/rvansa/infinispan/comments{/number}","issue_comment_url":"https://api.github.com/repos/rvansa/infinispan/issues/comments{/number}","contents_url":"https://api.github.com/repos/rvansa/infinispan/contents/{+path}","compare_url":"https://api.github.com/repos/rvansa/infinispan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rvansa/infinispan/merges","archive_url":"https://api.github.com/repos/rvansa/infinispan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rvansa/infinispan/downloads","issues_url":"https://api.github.com/repos/rvansa/infinispan/issues{/number}","pulls_url":"https://api.github.com/repos/rvansa/infinispan/pulls{/number}","milestones_url":"https://api.github.com/repos/rvansa/infinispan/milestones{/number}","notifications_url":"https://api.github.com/repos/rvansa/infinispan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rvansa/infinispan/labels{/name}","releases_url":"https://api.github.com/repos/rvansa/infinispan/releases{/id}","created_at":"2013-02-28T15:13:16Z","updated_at":"2014-06-23T13:30:40Z","pushed_at":"2015-03-26T08:26:08Z","git_url":"git://github.com/rvansa/infinispan.git","ssh_url":"git@github.com:rvansa/infinispan.git","clone_url":"https://github.com/rvansa/infinispan.git","svn_url":"https://github.com/rvansa/infinispan","homepage":"http://www.infinispan.org","size":61519,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"infinispan:master","ref":"master","sha":"934b8ca5ff8e19dc89f28bfc8c77e9b652b0322c","user":{"login":"infinispan","id":458093,"avatar_url":"https://avatars.githubusercontent.com/u/458093?v=3","gravatar_id":"","url":"https://api.github.com/users/infinispan","html_url":"https://github.com/infinispan","followers_url":"https://api.github.com/users/infinispan/followers","following_url":"https://api.github.com/users/infinispan/following{/other_user}","gists_url":"https://api.github.com/users/infinispan/gists{/gist_id}","starred_url":"https://api.github.com/users/infinispan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infinispan/subscriptions","organizations_url":"https://api.github.com/users/infinispan/orgs","repos_url":"https://api.github.com/users/infinispan/repos","events_url":"https://api.github.com/users/infinispan/events{/privacy}","received_events_url":"https://api.github.com/users/infinispan/received_events","type":"Organization","site_admin":false},"repo":{"id":1050944,"name":"infinispan","full_name":"infinispan/infinispan","owner":{"login":"infinispan","id":458093,"avatar_url":"https://avatars.githubusercontent.com/u/458093?v=3","gravatar_id":"","url":"https://api.github.com/users/infinispan","html_url":"https://github.com/infinispan","followers_url":"https://api.github.com/users/infinispan/followers","following_url":"https://api.github.com/users/infinispan/following{/other_user}","gists_url":"https://api.github.com/users/infinispan/gists{/gist_id}","starred_url":"https://api.github.com/users/infinispan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infinispan/subscriptions","organizations_url":"https://api.github.com/users/infinispan/orgs","repos_url":"https://api.github.com/users/infinispan/repos","events_url":"https://api.github.com/users/infinispan/events{/privacy}","received_events_url":"https://api.github.com/users/infinispan/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/infinispan/infinispan","description":"Infinispan is an open source data grid platform and highly scalable NoSQL cloud data store.","fork":false,"url":"https://api.github.com/repos/infinispan/infinispan","forks_url":"https://api.github.com/repos/infinispan/infinispan/forks","keys_url":"https://api.github.com/repos/infinispan/infinispan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/infinispan/infinispan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/infinispan/infinispan/teams","hooks_url":"https://api.github.com/repos/infinispan/infinispan/hooks","issue_events_url":"https://api.github.com/repos/infinispan/infinispan/issues/events{/number}","events_url":"https://api.github.com/repos/infinispan/infinispan/events","assignees_url":"https://api.github.com/repos/infinispan/infinispan/assignees{/user}","branches_url":"https://api.github.com/repos/infinispan/infinispan/branches{/branch}","tags_url":"https://api.github.com/repos/infinispan/infinispan/tags","blobs_url":"https://api.github.com/repos/infinispan/infinispan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/infinispan/infinispan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/infinispan/infinispan/git/refs{/sha}","trees_url":"https://api.github.com/repos/infinispan/infinispan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/infinispan/infinispan/statuses/{sha}","languages_url":"https://api.github.com/repos/infinispan/infinispan/languages","stargazers_url":"https://api.github.com/repos/infinispan/infinispan/stargazers","contributors_url":"https://api.github.com/repos/infinispan/infinispan/contributors","subscribers_url":"https://api.github.com/repos/infinispan/infinispan/subscribers","subscription_url":"https://api.github.com/repos/infinispan/infinispan/subscription","commits_url":"https://api.github.com/repos/infinispan/infinispan/commits{/sha}","git_commits_url":"https://api.github.com/repos/infinispan/infinispan/git/commits{/sha}","comments_url":"https://api.github.com/repos/infinispan/infinispan/comments{/number}","issue_comment_url":"https://api.github.com/repos/infinispan/infinispan/issues/comments{/number}","contents_url":"https://api.github.com/repos/infinispan/infinispan/contents/{+path}","compare_url":"https://api.github.com/repos/infinispan/infinispan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/infinispan/infinispan/merges","archive_url":"https://api.github.com/repos/infinispan/infinispan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/infinispan/infinispan/downloads","issues_url":"https://api.github.com/repos/infinispan/infinispan/issues{/number}","pulls_url":"https://api.github.com/repos/infinispan/infinispan/pulls{/number}","milestones_url":"https://api.github.com/repos/infinispan/infinispan/milestones{/number}","notifications_url":"https://api.github.com/repos/infinispan/infinispan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/infinispan/infinispan/labels{/name}","releases_url":"https://api.github.com/repos/infinispan/infinispan/releases{/id}","created_at":"2010-11-04T12:33:19Z","updated_at":"2015-03-26T09:09:47Z","pushed_at":"2015-03-26T11:58:28Z","git_url":"git://github.com/infinispan/infinispan.git","ssh_url":"git@github.com:infinispan/infinispan.git","clone_url":"https://github.com/infinispan/infinispan.git","svn_url":"https://github.com/infinispan/infinispan","homepage":"http://www.infinispan.org","size":140250,"stargazers_count":368,"watchers_count":368,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":278,"mirror_url":null,"open_issues_count":10,"forks":278,"open_issues":10,"watchers":368,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/3342"},"html":{"href":"https://github.com/infinispan/infinispan/pull/3342"},"issue":{"href":"https://api.github.com/repos/infinispan/infinispan/issues/3342"},"comments":{"href":"https://api.github.com/repos/infinispan/infinispan/issues/3342/comments"},"review_comments":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/3342/comments"},"review_comment":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/3342/commits"},"statuses":{"href":"https://api.github.com/repos/infinispan/infinispan/statuses/6c6b24f145ef11c920be4f7cbfcd79493370ddd7"}}}}