{"action":"created","comment":{"url":"https://api.github.com/repos/filodb/FiloDB/pulls/comments/228997333","pull_request_review_id":169308678,"id":228997333,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyODk5NzMzMw==","diff_hunk":"@@ -246,22 +286,173 @@ class OffheapLFSortedIDMapReader(memFactory: MemFactory, holderKlass: Class[_ <:\n     innerBinSearch(0, mapLen)\n   }\n \n+  /**\n+   * Acquire exclusive access to this map, spinning if necessary. Exclusive lock isn't re-entrant.\n+   */\n+  def acquireExclusive(inst: MapHolder): Unit = {","path":"memory/src/main/scala/filodb.memory/data/OffheapLFSortedIDMap.scala","position":183,"original_position":183,"commit_id":"b67a4c95fe34f030aedd41027b964ca86a1427c5","original_commit_id":"b67a4c95fe34f030aedd41027b964ca86a1427c5","user":{"login":"vishramachandran","id":5897052,"node_id":"MDQ6VXNlcjU4OTcwNTI=","avatar_url":"https://avatars0.githubusercontent.com/u/5897052?v=4","gravatar_id":"","url":"https://api.github.com/users/vishramachandran","html_url":"https://github.com/vishramachandran","followers_url":"https://api.github.com/users/vishramachandran/followers","following_url":"https://api.github.com/users/vishramachandran/following{/other_user}","gists_url":"https://api.github.com/users/vishramachandran/gists{/gist_id}","starred_url":"https://api.github.com/users/vishramachandran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishramachandran/subscriptions","organizations_url":"https://api.github.com/users/vishramachandran/orgs","repos_url":"https://api.github.com/users/vishramachandran/repos","events_url":"https://api.github.com/users/vishramachandran/events{/privacy}","received_events_url":"https://api.github.com/users/vishramachandran/received_events","type":"User","site_admin":false},"body":"Some metrics to track number of locks held?","created_at":"2018-10-29T16:18:50Z","updated_at":"2018-10-29T16:31:52Z","html_url":"https://github.com/filodb/FiloDB/pull/162#discussion_r228997333","pull_request_url":"https://api.github.com/repos/filodb/FiloDB/pulls/162","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/filodb/FiloDB/pulls/comments/228997333"},"html":{"href":"https://github.com/filodb/FiloDB/pull/162#discussion_r228997333"},"pull_request":{"href":"https://api.github.com/repos/filodb/FiloDB/pulls/162"}}},"pull_request":{"url":"https://api.github.com/repos/filodb/FiloDB/pulls/162","id":224355641,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0MzU1NjQx","html_url":"https://github.com/filodb/FiloDB/pull/162","diff_url":"https://github.com/filodb/FiloDB/pull/162.diff","patch_url":"https://github.com/filodb/FiloDB/pull/162.patch","issue_url":"https://api.github.com/repos/filodb/FiloDB/issues/162","number":162,"state":"open","locked":false,"title":"fix(memory,core): Chunkmap locking","user":{"login":"broneill","id":2822640,"node_id":"MDQ6VXNlcjI4MjI2NDA=","avatar_url":"https://avatars1.githubusercontent.com/u/2822640?v=4","gravatar_id":"","url":"https://api.github.com/users/broneill","html_url":"https://github.com/broneill","followers_url":"https://api.github.com/users/broneill/followers","following_url":"https://api.github.com/users/broneill/following{/other_user}","gists_url":"https://api.github.com/users/broneill/gists{/gist_id}","starred_url":"https://api.github.com/users/broneill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broneill/subscriptions","organizations_url":"https://api.github.com/users/broneill/orgs","repos_url":"https://api.github.com/users/broneill/repos","events_url":"https://api.github.com/users/broneill/events{/privacy}","received_events_url":"https://api.github.com/users/broneill/received_events","type":"User","site_admin":false},"body":"**Pull Request checklist**\r\n\r\n- [ ] The commit(s) message(s) follows the contribution [guidelines](CONTRIBUTING.md) ?\r\n- [x] Tests for the changes have been added (for bug fixes / features) ?\r\n- [x] Docs have been added / updated (for bug fixes / features) ?\r\n\r\n**New behavior :**\r\n\r\nChanges to fix memory reclamation race conditions when accessing chunks. The OffheapLFSortedIDMap now includes a lock, which should be used everywhere within FiloDB where chunks are accessed. This might reduce some concurrency, but it should resolve the memory errors and corruption that we're seeing.","created_at":"2018-10-19T17:18:41Z","updated_at":"2018-10-29T16:31:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f2b36c5784c7809a24ac44cf43911057b5780321","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/filodb/FiloDB/pulls/162/commits","review_comments_url":"https://api.github.com/repos/filodb/FiloDB/pulls/162/comments","review_comment_url":"https://api.github.com/repos/filodb/FiloDB/pulls/comments{/number}","comments_url":"https://api.github.com/repos/filodb/FiloDB/issues/162/comments","statuses_url":"https://api.github.com/repos/filodb/FiloDB/statuses/b67a4c95fe34f030aedd41027b964ca86a1427c5","head":{"label":"broneill:chunkmap-locking","ref":"chunkmap-locking","sha":"b67a4c95fe34f030aedd41027b964ca86a1427c5","user":{"login":"broneill","id":2822640,"node_id":"MDQ6VXNlcjI4MjI2NDA=","avatar_url":"https://avatars1.githubusercontent.com/u/2822640?v=4","gravatar_id":"","url":"https://api.github.com/users/broneill","html_url":"https://github.com/broneill","followers_url":"https://api.github.com/users/broneill/followers","following_url":"https://api.github.com/users/broneill/following{/other_user}","gists_url":"https://api.github.com/users/broneill/gists{/gist_id}","starred_url":"https://api.github.com/users/broneill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broneill/subscriptions","organizations_url":"https://api.github.com/users/broneill/orgs","repos_url":"https://api.github.com/users/broneill/repos","events_url":"https://api.github.com/users/broneill/events{/privacy}","received_events_url":"https://api.github.com/users/broneill/received_events","type":"User","site_admin":false},"repo":{"id":153812321,"node_id":"MDEwOlJlcG9zaXRvcnkxNTM4MTIzMjE=","name":"FiloDB","full_name":"broneill/FiloDB","private":false,"owner":{"login":"broneill","id":2822640,"node_id":"MDQ6VXNlcjI4MjI2NDA=","avatar_url":"https://avatars1.githubusercontent.com/u/2822640?v=4","gravatar_id":"","url":"https://api.github.com/users/broneill","html_url":"https://github.com/broneill","followers_url":"https://api.github.com/users/broneill/followers","following_url":"https://api.github.com/users/broneill/following{/other_user}","gists_url":"https://api.github.com/users/broneill/gists{/gist_id}","starred_url":"https://api.github.com/users/broneill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broneill/subscriptions","organizations_url":"https://api.github.com/users/broneill/orgs","repos_url":"https://api.github.com/users/broneill/repos","events_url":"https://api.github.com/users/broneill/events{/privacy}","received_events_url":"https://api.github.com/users/broneill/received_events","type":"User","site_admin":false},"html_url":"https://github.com/broneill/FiloDB","description":"Prometheus-compatible distributed time series database","fork":true,"url":"https://api.github.com/repos/broneill/FiloDB","forks_url":"https://api.github.com/repos/broneill/FiloDB/forks","keys_url":"https://api.github.com/repos/broneill/FiloDB/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broneill/FiloDB/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broneill/FiloDB/teams","hooks_url":"https://api.github.com/repos/broneill/FiloDB/hooks","issue_events_url":"https://api.github.com/repos/broneill/FiloDB/issues/events{/number}","events_url":"https://api.github.com/repos/broneill/FiloDB/events","assignees_url":"https://api.github.com/repos/broneill/FiloDB/assignees{/user}","branches_url":"https://api.github.com/repos/broneill/FiloDB/branches{/branch}","tags_url":"https://api.github.com/repos/broneill/FiloDB/tags","blobs_url":"https://api.github.com/repos/broneill/FiloDB/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broneill/FiloDB/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broneill/FiloDB/git/refs{/sha}","trees_url":"https://api.github.com/repos/broneill/FiloDB/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broneill/FiloDB/statuses/{sha}","languages_url":"https://api.github.com/repos/broneill/FiloDB/languages","stargazers_url":"https://api.github.com/repos/broneill/FiloDB/stargazers","contributors_url":"https://api.github.com/repos/broneill/FiloDB/contributors","subscribers_url":"https://api.github.com/repos/broneill/FiloDB/subscribers","subscription_url":"https://api.github.com/repos/broneill/FiloDB/subscription","commits_url":"https://api.github.com/repos/broneill/FiloDB/commits{/sha}","git_commits_url":"https://api.github.com/repos/broneill/FiloDB/git/commits{/sha}","comments_url":"https://api.github.com/repos/broneill/FiloDB/comments{/number}","issue_comment_url":"https://api.github.com/repos/broneill/FiloDB/issues/comments{/number}","contents_url":"https://api.github.com/repos/broneill/FiloDB/contents/{+path}","compare_url":"https://api.github.com/repos/broneill/FiloDB/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broneill/FiloDB/merges","archive_url":"https://api.github.com/repos/broneill/FiloDB/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broneill/FiloDB/downloads","issues_url":"https://api.github.com/repos/broneill/FiloDB/issues{/number}","pulls_url":"https://api.github.com/repos/broneill/FiloDB/pulls{/number}","milestones_url":"https://api.github.com/repos/broneill/FiloDB/milestones{/number}","notifications_url":"https://api.github.com/repos/broneill/FiloDB/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broneill/FiloDB/labels{/name}","releases_url":"https://api.github.com/repos/broneill/FiloDB/releases{/id}","deployments_url":"https://api.github.com/repos/broneill/FiloDB/deployments","created_at":"2018-10-19T16:33:09Z","updated_at":"2018-10-19T16:33:12Z","pushed_at":"2018-10-26T21:44:06Z","git_url":"git://github.com/broneill/FiloDB.git","ssh_url":"git@github.com:broneill/FiloDB.git","clone_url":"https://github.com/broneill/FiloDB.git","svn_url":"https://github.com/broneill/FiloDB","homepage":"","size":24561,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":"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":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"filodb:develop","ref":"develop","sha":"72e92135d7e9606ec564bb46220356a86568b380","user":{"login":"filodb","id":19396983,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5Mzk2OTgz","avatar_url":"https://avatars3.githubusercontent.com/u/19396983?v=4","gravatar_id":"","url":"https://api.github.com/users/filodb","html_url":"https://github.com/filodb","followers_url":"https://api.github.com/users/filodb/followers","following_url":"https://api.github.com/users/filodb/following{/other_user}","gists_url":"https://api.github.com/users/filodb/gists{/gist_id}","starred_url":"https://api.github.com/users/filodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filodb/subscriptions","organizations_url":"https://api.github.com/users/filodb/orgs","repos_url":"https://api.github.com/users/filodb/repos","events_url":"https://api.github.com/users/filodb/events{/privacy}","received_events_url":"https://api.github.com/users/filodb/received_events","type":"Organization","site_admin":false},"repo":{"id":29259281,"node_id":"MDEwOlJlcG9zaXRvcnkyOTI1OTI4MQ==","name":"FiloDB","full_name":"filodb/FiloDB","private":false,"owner":{"login":"filodb","id":19396983,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5Mzk2OTgz","avatar_url":"https://avatars3.githubusercontent.com/u/19396983?v=4","gravatar_id":"","url":"https://api.github.com/users/filodb","html_url":"https://github.com/filodb","followers_url":"https://api.github.com/users/filodb/followers","following_url":"https://api.github.com/users/filodb/following{/other_user}","gists_url":"https://api.github.com/users/filodb/gists{/gist_id}","starred_url":"https://api.github.com/users/filodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filodb/subscriptions","organizations_url":"https://api.github.com/users/filodb/orgs","repos_url":"https://api.github.com/users/filodb/repos","events_url":"https://api.github.com/users/filodb/events{/privacy}","received_events_url":"https://api.github.com/users/filodb/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/filodb/FiloDB","description":"Prometheus-compatible distributed time series database","fork":false,"url":"https://api.github.com/repos/filodb/FiloDB","forks_url":"https://api.github.com/repos/filodb/FiloDB/forks","keys_url":"https://api.github.com/repos/filodb/FiloDB/keys{/key_id}","collaborators_url":"https://api.github.com/repos/filodb/FiloDB/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/filodb/FiloDB/teams","hooks_url":"https://api.github.com/repos/filodb/FiloDB/hooks","issue_events_url":"https://api.github.com/repos/filodb/FiloDB/issues/events{/number}","events_url":"https://api.github.com/repos/filodb/FiloDB/events","assignees_url":"https://api.github.com/repos/filodb/FiloDB/assignees{/user}","branches_url":"https://api.github.com/repos/filodb/FiloDB/branches{/branch}","tags_url":"https://api.github.com/repos/filodb/FiloDB/tags","blobs_url":"https://api.github.com/repos/filodb/FiloDB/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/filodb/FiloDB/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/filodb/FiloDB/git/refs{/sha}","trees_url":"https://api.github.com/repos/filodb/FiloDB/git/trees{/sha}","statuses_url":"https://api.github.com/repos/filodb/FiloDB/statuses/{sha}","languages_url":"https://api.github.com/repos/filodb/FiloDB/languages","stargazers_url":"https://api.github.com/repos/filodb/FiloDB/stargazers","contributors_url":"https://api.github.com/repos/filodb/FiloDB/contributors","subscribers_url":"https://api.github.com/repos/filodb/FiloDB/subscribers","subscription_url":"https://api.github.com/repos/filodb/FiloDB/subscription","commits_url":"https://api.github.com/repos/filodb/FiloDB/commits{/sha}","git_commits_url":"https://api.github.com/repos/filodb/FiloDB/git/commits{/sha}","comments_url":"https://api.github.com/repos/filodb/FiloDB/comments{/number}","issue_comment_url":"https://api.github.com/repos/filodb/FiloDB/issues/comments{/number}","contents_url":"https://api.github.com/repos/filodb/FiloDB/contents/{+path}","compare_url":"https://api.github.com/repos/filodb/FiloDB/compare/{base}...{head}","merges_url":"https://api.github.com/repos/filodb/FiloDB/merges","archive_url":"https://api.github.com/repos/filodb/FiloDB/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/filodb/FiloDB/downloads","issues_url":"https://api.github.com/repos/filodb/FiloDB/issues{/number}","pulls_url":"https://api.github.com/repos/filodb/FiloDB/pulls{/number}","milestones_url":"https://api.github.com/repos/filodb/FiloDB/milestones{/number}","notifications_url":"https://api.github.com/repos/filodb/FiloDB/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/filodb/FiloDB/labels{/name}","releases_url":"https://api.github.com/repos/filodb/FiloDB/releases{/id}","deployments_url":"https://api.github.com/repos/filodb/FiloDB/deployments","created_at":"2015-01-14T18:35:32Z","updated_at":"2018-10-28T03:15:07Z","pushed_at":"2018-10-26T21:44:08Z","git_url":"git://github.com/filodb/FiloDB.git","ssh_url":"git@github.com:filodb/FiloDB.git","clone_url":"https://github.com/filodb/FiloDB.git","svn_url":"https://github.com/filodb/FiloDB","homepage":"","size":24533,"stargazers_count":1032,"watchers_count":1032,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":184,"mirror_url":null,"archived":false,"open_issues_count":26,"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":184,"open_issues":26,"watchers":1032,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/filodb/FiloDB/pulls/162"},"html":{"href":"https://github.com/filodb/FiloDB/pull/162"},"issue":{"href":"https://api.github.com/repos/filodb/FiloDB/issues/162"},"comments":{"href":"https://api.github.com/repos/filodb/FiloDB/issues/162/comments"},"review_comments":{"href":"https://api.github.com/repos/filodb/FiloDB/pulls/162/comments"},"review_comment":{"href":"https://api.github.com/repos/filodb/FiloDB/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/filodb/FiloDB/pulls/162/commits"},"statuses":{"href":"https://api.github.com/repos/filodb/FiloDB/statuses/b67a4c95fe34f030aedd41027b964ca86a1427c5"}},"author_association":"NONE"}}
{"actor":{"display_login":"vishramachandran"}}