{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/rocksdb/pulls/comments/229869593","pull_request_review_id":170474527,"id":229869593,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyOTg2OTU5Mw==","diff_hunk":"@@ -2170,6 +2170,10 @@ Status DBImpl::BackgroundCompaction(bool* made_progress,\n       manual_compaction->in_progress = false;\n       manual_compaction = nullptr;\n     }\n+    if (c) {","path":"db/db_impl_compaction_flush.cc","position":4,"original_position":4,"commit_id":"383726fd65164ebe258fe8d5ba77f3c1c7faff2b","original_commit_id":"383726fd65164ebe258fe8d5ba77f3c1c7faff2b","user":{"login":"ajkr","id":4780362,"node_id":"MDQ6VXNlcjQ3ODAzNjI=","avatar_url":"https://avatars0.githubusercontent.com/u/4780362?v=4","gravatar_id":"","url":"https://api.github.com/users/ajkr","html_url":"https://github.com/ajkr","followers_url":"https://api.github.com/users/ajkr/followers","following_url":"https://api.github.com/users/ajkr/following{/other_user}","gists_url":"https://api.github.com/users/ajkr/gists{/gist_id}","starred_url":"https://api.github.com/users/ajkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajkr/subscriptions","organizations_url":"https://api.github.com/users/ajkr/orgs","repos_url":"https://api.github.com/users/ajkr/repos","events_url":"https://api.github.com/users/ajkr/events{/privacy}","received_events_url":"https://api.github.com/users/ajkr/received_events","type":"User","site_admin":false},"body":"clarified in the description but left the title since I believe manual compaction is the dominant use of pre-picked compaction.","created_at":"2018-10-31T21:11:39Z","updated_at":"2018-10-31T21:11:39Z","html_url":"https://github.com/facebook/rocksdb/pull/4611#discussion_r229869593","pull_request_url":"https://api.github.com/repos/facebook/rocksdb/pulls/4611","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/facebook/rocksdb/pulls/comments/229869593"},"html":{"href":"https://github.com/facebook/rocksdb/pull/4611#discussion_r229869593"},"pull_request":{"href":"https://api.github.com/repos/facebook/rocksdb/pulls/4611"}},"in_reply_to_id":229853353},"pull_request":{"url":"https://api.github.com/repos/facebook/rocksdb/pulls/4611","id":227425403,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3NDI1NDAz","html_url":"https://github.com/facebook/rocksdb/pull/4611","diff_url":"https://github.com/facebook/rocksdb/pull/4611.diff","patch_url":"https://github.com/facebook/rocksdb/pull/4611.patch","issue_url":"https://api.github.com/repos/facebook/rocksdb/issues/4611","number":4611,"state":"open","locked":false,"title":"Prevent manual compaction hanging in read-only mode","user":{"login":"ajkr","id":4780362,"node_id":"MDQ6VXNlcjQ3ODAzNjI=","avatar_url":"https://avatars0.githubusercontent.com/u/4780362?v=4","gravatar_id":"","url":"https://api.github.com/users/ajkr","html_url":"https://github.com/ajkr","followers_url":"https://api.github.com/users/ajkr/followers","following_url":"https://api.github.com/users/ajkr/following{/other_user}","gists_url":"https://api.github.com/users/ajkr/gists{/gist_id}","starred_url":"https://api.github.com/users/ajkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajkr/subscriptions","organizations_url":"https://api.github.com/users/ajkr/orgs","repos_url":"https://api.github.com/users/ajkr/repos","events_url":"https://api.github.com/users/ajkr/events{/privacy}","received_events_url":"https://api.github.com/users/ajkr/received_events","type":"User","site_admin":false},"body":"A background compaction with pre-picked files (i.e., either a manual compaction or a bottom-pri compaction) fails when the DB is in read-only mode. In the failure handling, we forgot to unregister the compaction and the files it covered. Then subsequent manual compactions could conflict with this zombie compaction (possibly Halloween related) and wait forever for it to finish.\r\n\r\nTest Plan:\r\n\r\n- new unit test, verified it hangs forever before this fix.","created_at":"2018-10-31T20:08:18Z","updated_at":"2018-10-31T21:11:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8e9147843d8fcdf06552c2d3d2fe3bd29924e2ef","assignee":null,"assignees":[],"requested_reviewers":[{"login":"anand1976","id":33647610,"node_id":"MDQ6VXNlcjMzNjQ3NjEw","avatar_url":"https://avatars0.githubusercontent.com/u/33647610?v=4","gravatar_id":"","url":"https://api.github.com/users/anand1976","html_url":"https://github.com/anand1976","followers_url":"https://api.github.com/users/anand1976/followers","following_url":"https://api.github.com/users/anand1976/following{/other_user}","gists_url":"https://api.github.com/users/anand1976/gists{/gist_id}","starred_url":"https://api.github.com/users/anand1976/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anand1976/subscriptions","organizations_url":"https://api.github.com/users/anand1976/orgs","repos_url":"https://api.github.com/users/anand1976/repos","events_url":"https://api.github.com/users/anand1976/events{/privacy}","received_events_url":"https://api.github.com/users/anand1976/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":196859108,"node_id":"MDU6TGFiZWwxOTY4NTkxMDg=","url":"https://api.github.com/repos/facebook/rocksdb/labels/CLA%20Signed","name":"CLA Signed","color":"009900","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/rocksdb/pulls/4611/commits","review_comments_url":"https://api.github.com/repos/facebook/rocksdb/pulls/4611/comments","review_comment_url":"https://api.github.com/repos/facebook/rocksdb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/rocksdb/issues/4611/comments","statuses_url":"https://api.github.com/repos/facebook/rocksdb/statuses/383726fd65164ebe258fe8d5ba77f3c1c7faff2b","head":{"label":"ajkr:fix-manual-compaction-read-only-mode","ref":"fix-manual-compaction-read-only-mode","sha":"383726fd65164ebe258fe8d5ba77f3c1c7faff2b","user":{"login":"ajkr","id":4780362,"node_id":"MDQ6VXNlcjQ3ODAzNjI=","avatar_url":"https://avatars0.githubusercontent.com/u/4780362?v=4","gravatar_id":"","url":"https://api.github.com/users/ajkr","html_url":"https://github.com/ajkr","followers_url":"https://api.github.com/users/ajkr/followers","following_url":"https://api.github.com/users/ajkr/following{/other_user}","gists_url":"https://api.github.com/users/ajkr/gists{/gist_id}","starred_url":"https://api.github.com/users/ajkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajkr/subscriptions","organizations_url":"https://api.github.com/users/ajkr/orgs","repos_url":"https://api.github.com/users/ajkr/repos","events_url":"https://api.github.com/users/ajkr/events{/privacy}","received_events_url":"https://api.github.com/users/ajkr/received_events","type":"User","site_admin":false},"repo":{"id":69681666,"node_id":"MDEwOlJlcG9zaXRvcnk2OTY4MTY2Ng==","name":"rocksdb","full_name":"ajkr/rocksdb","private":false,"owner":{"login":"ajkr","id":4780362,"node_id":"MDQ6VXNlcjQ3ODAzNjI=","avatar_url":"https://avatars0.githubusercontent.com/u/4780362?v=4","gravatar_id":"","url":"https://api.github.com/users/ajkr","html_url":"https://github.com/ajkr","followers_url":"https://api.github.com/users/ajkr/followers","following_url":"https://api.github.com/users/ajkr/following{/other_user}","gists_url":"https://api.github.com/users/ajkr/gists{/gist_id}","starred_url":"https://api.github.com/users/ajkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajkr/subscriptions","organizations_url":"https://api.github.com/users/ajkr/orgs","repos_url":"https://api.github.com/users/ajkr/repos","events_url":"https://api.github.com/users/ajkr/events{/privacy}","received_events_url":"https://api.github.com/users/ajkr/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ajkr/rocksdb","description":"A library that provides an embeddable, persistent key-value store for fast storage.","fork":true,"url":"https://api.github.com/repos/ajkr/rocksdb","forks_url":"https://api.github.com/repos/ajkr/rocksdb/forks","keys_url":"https://api.github.com/repos/ajkr/rocksdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ajkr/rocksdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ajkr/rocksdb/teams","hooks_url":"https://api.github.com/repos/ajkr/rocksdb/hooks","issue_events_url":"https://api.github.com/repos/ajkr/rocksdb/issues/events{/number}","events_url":"https://api.github.com/repos/ajkr/rocksdb/events","assignees_url":"https://api.github.com/repos/ajkr/rocksdb/assignees{/user}","branches_url":"https://api.github.com/repos/ajkr/rocksdb/branches{/branch}","tags_url":"https://api.github.com/repos/ajkr/rocksdb/tags","blobs_url":"https://api.github.com/repos/ajkr/rocksdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ajkr/rocksdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ajkr/rocksdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/ajkr/rocksdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ajkr/rocksdb/statuses/{sha}","languages_url":"https://api.github.com/repos/ajkr/rocksdb/languages","stargazers_url":"https://api.github.com/repos/ajkr/rocksdb/stargazers","contributors_url":"https://api.github.com/repos/ajkr/rocksdb/contributors","subscribers_url":"https://api.github.com/repos/ajkr/rocksdb/subscribers","subscription_url":"https://api.github.com/repos/ajkr/rocksdb/subscription","commits_url":"https://api.github.com/repos/ajkr/rocksdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/ajkr/rocksdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/ajkr/rocksdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/ajkr/rocksdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/ajkr/rocksdb/contents/{+path}","compare_url":"https://api.github.com/repos/ajkr/rocksdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ajkr/rocksdb/merges","archive_url":"https://api.github.com/repos/ajkr/rocksdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ajkr/rocksdb/downloads","issues_url":"https://api.github.com/repos/ajkr/rocksdb/issues{/number}","pulls_url":"https://api.github.com/repos/ajkr/rocksdb/pulls{/number}","milestones_url":"https://api.github.com/repos/ajkr/rocksdb/milestones{/number}","notifications_url":"https://api.github.com/repos/ajkr/rocksdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ajkr/rocksdb/labels{/name}","releases_url":"https://api.github.com/repos/ajkr/rocksdb/releases{/id}","deployments_url":"https://api.github.com/repos/ajkr/rocksdb/deployments","created_at":"2016-09-30T16:09:32Z","updated_at":"2016-09-30T16:09:37Z","pushed_at":"2018-10-31T20:03:48Z","git_url":"git://github.com/ajkr/rocksdb.git","ssh_url":"git@github.com:ajkr/rocksdb.git","clone_url":"https://github.com/ajkr/rocksdb.git","svn_url":"https://github.com/ajkr/rocksdb","homepage":"http://rocksdb.org","size":143680,"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":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"50895e5f0dd293602b7ccb5d284e6143715a27e5","user":{"login":"facebook","id":69631,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5NjMx","avatar_url":"https://avatars3.githubusercontent.com/u/69631?v=4","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":6934395,"node_id":"MDEwOlJlcG9zaXRvcnk2OTM0Mzk1","name":"rocksdb","full_name":"facebook/rocksdb","private":false,"owner":{"login":"facebook","id":69631,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5NjMx","avatar_url":"https://avatars3.githubusercontent.com/u/69631?v=4","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/facebook/rocksdb","description":"A library that provides an embeddable, persistent key-value store for fast storage.","fork":false,"url":"https://api.github.com/repos/facebook/rocksdb","forks_url":"https://api.github.com/repos/facebook/rocksdb/forks","keys_url":"https://api.github.com/repos/facebook/rocksdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/rocksdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/rocksdb/teams","hooks_url":"https://api.github.com/repos/facebook/rocksdb/hooks","issue_events_url":"https://api.github.com/repos/facebook/rocksdb/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/rocksdb/events","assignees_url":"https://api.github.com/repos/facebook/rocksdb/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/rocksdb/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/rocksdb/tags","blobs_url":"https://api.github.com/repos/facebook/rocksdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/rocksdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/rocksdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/rocksdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/rocksdb/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/rocksdb/languages","stargazers_url":"https://api.github.com/repos/facebook/rocksdb/stargazers","contributors_url":"https://api.github.com/repos/facebook/rocksdb/contributors","subscribers_url":"https://api.github.com/repos/facebook/rocksdb/subscribers","subscription_url":"https://api.github.com/repos/facebook/rocksdb/subscription","commits_url":"https://api.github.com/repos/facebook/rocksdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/rocksdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/rocksdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/rocksdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/rocksdb/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/rocksdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/rocksdb/merges","archive_url":"https://api.github.com/repos/facebook/rocksdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/rocksdb/downloads","issues_url":"https://api.github.com/repos/facebook/rocksdb/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/rocksdb/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/rocksdb/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/rocksdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/rocksdb/labels{/name}","releases_url":"https://api.github.com/repos/facebook/rocksdb/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/rocksdb/deployments","created_at":"2012-11-30T06:16:18Z","updated_at":"2018-10-31T16:52:25Z","pushed_at":"2018-10-31T21:06:06Z","git_url":"git://github.com/facebook/rocksdb.git","ssh_url":"git@github.com:facebook/rocksdb.git","clone_url":"https://github.com/facebook/rocksdb.git","svn_url":"https://github.com/facebook/rocksdb","homepage":"http://rocksdb.org","size":119867,"stargazers_count":11929,"watchers_count":11929,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2636,"mirror_url":null,"archived":false,"open_issues_count":231,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2636,"open_issues":231,"watchers":11929,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/rocksdb/pulls/4611"},"html":{"href":"https://github.com/facebook/rocksdb/pull/4611"},"issue":{"href":"https://api.github.com/repos/facebook/rocksdb/issues/4611"},"comments":{"href":"https://api.github.com/repos/facebook/rocksdb/issues/4611/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/rocksdb/pulls/4611/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/rocksdb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/rocksdb/pulls/4611/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/rocksdb/statuses/383726fd65164ebe258fe8d5ba77f3c1c7faff2b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ajkr"}}