{"action":"created","comment":{"url":"https://api.github.com/repos/apache/bookkeeper/pulls/comments/177532672","pull_request_review_id":107419931,"id":177532672,"diff_hunk":"@@ -209,16 +211,39 @@ public void onSizeLimitReached(final Checkpoint cp) throws IOException {\n             public void run() {\n                 try {\n                     LOG.info(\"Started flushing mem table.\");\n-                    long logIdBeforeFlush = entryLogger.getCurrentLogId();\n+                    long prevAllocLogIdBeforeFlush = entryLogger.getPreviousAllocatedEntryLogId();","path":"bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/SortedLedgerStorage.java","position":30,"original_position":30,"commit_id":"1f45009f359bdfc3306d27fc149db48cf1a1c146","original_commit_id":"1f45009f359bdfc3306d27fc149db48cf1a1c146","user":{"login":"sijie","id":1217863,"avatar_url":"https://avatars2.githubusercontent.com/u/1217863?v=4","gravatar_id":"","url":"https://api.github.com/users/sijie","html_url":"https://github.com/sijie","followers_url":"https://api.github.com/users/sijie/followers","following_url":"https://api.github.com/users/sijie/following{/other_user}","gists_url":"https://api.github.com/users/sijie/gists{/gist_id}","starred_url":"https://api.github.com/users/sijie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sijie/subscriptions","organizations_url":"https://api.github.com/users/sijie/orgs","repos_url":"https://api.github.com/users/sijie/repos","events_url":"https://api.github.com/users/sijie/events{/privacy}","received_events_url":"https://api.github.com/users/sijie/received_events","type":"User","site_admin":false},"body":"This change is not correct. Because it should be \"current\" log id, not \"previous allocated entry log id\". That says the behavior is different between preallocation enabled and disabled.\r\n\r\nThat leads me to think that current entry log manager interface is not abstracted with right methods. because it abstracts a lot of methods around the underlying files, which underlying files are kind of tight with corresponding checkpointing and flushing logic. two different entry log manager can't really fit in this interface or checkpointing logic as well. \r\n\r\nSo as what I said in my previous comment, we need to think about what is the right methods to put in EntryLogManager.\r\n\r\n> I would suggest the EntryLogManager should hide the details on how to create log, allocate log,\r\n> flush/checkpoint logs. the details such as preallocationLogId, unflushedLogId and how to lock them should be > hidden to the implementation, rather than defining a too finer interface here.\r\n","created_at":"2018-03-27T18:48:19Z","updated_at":"2018-03-27T18:57:09Z","html_url":"https://github.com/apache/bookkeeper/pull/1281#discussion_r177532672","pull_request_url":"https://api.github.com/repos/apache/bookkeeper/pulls/1281","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/bookkeeper/pulls/comments/177532672"},"html":{"href":"https://github.com/apache/bookkeeper/pull/1281#discussion_r177532672"},"pull_request":{"href":"https://api.github.com/repos/apache/bookkeeper/pulls/1281"}}},"pull_request":{"url":"https://api.github.com/repos/apache/bookkeeper/pulls/1281","id":176605028,"html_url":"https://github.com/apache/bookkeeper/pull/1281","diff_url":"https://github.com/apache/bookkeeper/pull/1281.diff","patch_url":"https://github.com/apache/bookkeeper/pull/1281.patch","issue_url":"https://api.github.com/repos/apache/bookkeeper/issues/1281","number":1281,"state":"open","locked":false,"title":"Issue #570: Introducing EntryLogManager.","user":{"login":"reddycharan","id":13989266,"avatar_url":"https://avatars3.githubusercontent.com/u/13989266?v=4","gravatar_id":"","url":"https://api.github.com/users/reddycharan","html_url":"https://github.com/reddycharan","followers_url":"https://api.github.com/users/reddycharan/followers","following_url":"https://api.github.com/users/reddycharan/following{/other_user}","gists_url":"https://api.github.com/users/reddycharan/gists{/gist_id}","starred_url":"https://api.github.com/users/reddycharan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reddycharan/subscriptions","organizations_url":"https://api.github.com/users/reddycharan/orgs","repos_url":"https://api.github.com/users/reddycharan/repos","events_url":"https://api.github.com/users/reddycharan/events{/privacy}","received_events_url":"https://api.github.com/users/reddycharan/received_events","type":"User","site_admin":false},"body":"Descriptions of the changes in this PR:\r\n\r\nIntroducing EntryLogManager interface, which abstracts out current activeLogChannel,\r\nrotatedLogChannels and corresponding lock for activeLogChannel. The current logic of\r\nhandling logs is moved to EntryLogManagerForSingleEntryLog class, in the\r\nnext sub-task EntryLogManagerForEntryLogPerLedger will be introduced. Also there\r\nare minor changes to createNewLog logic and leastUnflushedLogId logic.\r\n\r\nThis is < sub-task5  > of Issue #570\r\n\r\nMaster Issue: #570 \r\n","created_at":"2018-03-21T20:46:54Z","updated_at":"2018-03-27T18:57:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"38c9566fd3b03a326180ae40cbaf0db6c2793624","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/bookkeeper/pulls/1281/commits","review_comments_url":"https://api.github.com/repos/apache/bookkeeper/pulls/1281/comments","review_comment_url":"https://api.github.com/repos/apache/bookkeeper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/bookkeeper/issues/1281/comments","statuses_url":"https://api.github.com/repos/apache/bookkeeper/statuses/1f45009f359bdfc3306d27fc149db48cf1a1c146","head":{"label":"reddycharan:entrylogmanager","ref":"entrylogmanager","sha":"1f45009f359bdfc3306d27fc149db48cf1a1c146","user":{"login":"reddycharan","id":13989266,"avatar_url":"https://avatars3.githubusercontent.com/u/13989266?v=4","gravatar_id":"","url":"https://api.github.com/users/reddycharan","html_url":"https://github.com/reddycharan","followers_url":"https://api.github.com/users/reddycharan/followers","following_url":"https://api.github.com/users/reddycharan/following{/other_user}","gists_url":"https://api.github.com/users/reddycharan/gists{/gist_id}","starred_url":"https://api.github.com/users/reddycharan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reddycharan/subscriptions","organizations_url":"https://api.github.com/users/reddycharan/orgs","repos_url":"https://api.github.com/users/reddycharan/repos","events_url":"https://api.github.com/users/reddycharan/events{/privacy}","received_events_url":"https://api.github.com/users/reddycharan/received_events","type":"User","site_admin":false},"repo":{"id":71182574,"name":"bookkeeper","full_name":"reddycharan/bookkeeper","owner":{"login":"reddycharan","id":13989266,"avatar_url":"https://avatars3.githubusercontent.com/u/13989266?v=4","gravatar_id":"","url":"https://api.github.com/users/reddycharan","html_url":"https://github.com/reddycharan","followers_url":"https://api.github.com/users/reddycharan/followers","following_url":"https://api.github.com/users/reddycharan/following{/other_user}","gists_url":"https://api.github.com/users/reddycharan/gists{/gist_id}","starred_url":"https://api.github.com/users/reddycharan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reddycharan/subscriptions","organizations_url":"https://api.github.com/users/reddycharan/orgs","repos_url":"https://api.github.com/users/reddycharan/repos","events_url":"https://api.github.com/users/reddycharan/events{/privacy}","received_events_url":"https://api.github.com/users/reddycharan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/reddycharan/bookkeeper","description":"Mirror of Apache Bookkeeper","fork":true,"url":"https://api.github.com/repos/reddycharan/bookkeeper","forks_url":"https://api.github.com/repos/reddycharan/bookkeeper/forks","keys_url":"https://api.github.com/repos/reddycharan/bookkeeper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reddycharan/bookkeeper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reddycharan/bookkeeper/teams","hooks_url":"https://api.github.com/repos/reddycharan/bookkeeper/hooks","issue_events_url":"https://api.github.com/repos/reddycharan/bookkeeper/issues/events{/number}","events_url":"https://api.github.com/repos/reddycharan/bookkeeper/events","assignees_url":"https://api.github.com/repos/reddycharan/bookkeeper/assignees{/user}","branches_url":"https://api.github.com/repos/reddycharan/bookkeeper/branches{/branch}","tags_url":"https://api.github.com/repos/reddycharan/bookkeeper/tags","blobs_url":"https://api.github.com/repos/reddycharan/bookkeeper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reddycharan/bookkeeper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reddycharan/bookkeeper/git/refs{/sha}","trees_url":"https://api.github.com/repos/reddycharan/bookkeeper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reddycharan/bookkeeper/statuses/{sha}","languages_url":"https://api.github.com/repos/reddycharan/bookkeeper/languages","stargazers_url":"https://api.github.com/repos/reddycharan/bookkeeper/stargazers","contributors_url":"https://api.github.com/repos/reddycharan/bookkeeper/contributors","subscribers_url":"https://api.github.com/repos/reddycharan/bookkeeper/subscribers","subscription_url":"https://api.github.com/repos/reddycharan/bookkeeper/subscription","commits_url":"https://api.github.com/repos/reddycharan/bookkeeper/commits{/sha}","git_commits_url":"https://api.github.com/repos/reddycharan/bookkeeper/git/commits{/sha}","comments_url":"https://api.github.com/repos/reddycharan/bookkeeper/comments{/number}","issue_comment_url":"https://api.github.com/repos/reddycharan/bookkeeper/issues/comments{/number}","contents_url":"https://api.github.com/repos/reddycharan/bookkeeper/contents/{+path}","compare_url":"https://api.github.com/repos/reddycharan/bookkeeper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reddycharan/bookkeeper/merges","archive_url":"https://api.github.com/repos/reddycharan/bookkeeper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reddycharan/bookkeeper/downloads","issues_url":"https://api.github.com/repos/reddycharan/bookkeeper/issues{/number}","pulls_url":"https://api.github.com/repos/reddycharan/bookkeeper/pulls{/number}","milestones_url":"https://api.github.com/repos/reddycharan/bookkeeper/milestones{/number}","notifications_url":"https://api.github.com/repos/reddycharan/bookkeeper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reddycharan/bookkeeper/labels{/name}","releases_url":"https://api.github.com/repos/reddycharan/bookkeeper/releases{/id}","deployments_url":"https://api.github.com/repos/reddycharan/bookkeeper/deployments","created_at":"2016-10-17T21:25:32Z","updated_at":"2016-10-17T21:25:35Z","pushed_at":"2018-03-26T22:48:49Z","git_url":"git://github.com/reddycharan/bookkeeper.git","ssh_url":"git@github.com:reddycharan/bookkeeper.git","clone_url":"https://github.com/reddycharan/bookkeeper.git","svn_url":"https://github.com/reddycharan/bookkeeper","homepage":null,"size":22921,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"a36f1ab88034d6b1bdfe75e725886c2e8cca1e85","user":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":1575956,"name":"bookkeeper","full_name":"apache/bookkeeper","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/bookkeeper","description":"Apache Bookkeeper","fork":false,"url":"https://api.github.com/repos/apache/bookkeeper","forks_url":"https://api.github.com/repos/apache/bookkeeper/forks","keys_url":"https://api.github.com/repos/apache/bookkeeper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/bookkeeper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/bookkeeper/teams","hooks_url":"https://api.github.com/repos/apache/bookkeeper/hooks","issue_events_url":"https://api.github.com/repos/apache/bookkeeper/issues/events{/number}","events_url":"https://api.github.com/repos/apache/bookkeeper/events","assignees_url":"https://api.github.com/repos/apache/bookkeeper/assignees{/user}","branches_url":"https://api.github.com/repos/apache/bookkeeper/branches{/branch}","tags_url":"https://api.github.com/repos/apache/bookkeeper/tags","blobs_url":"https://api.github.com/repos/apache/bookkeeper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/bookkeeper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/bookkeeper/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/bookkeeper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/bookkeeper/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/bookkeeper/languages","stargazers_url":"https://api.github.com/repos/apache/bookkeeper/stargazers","contributors_url":"https://api.github.com/repos/apache/bookkeeper/contributors","subscribers_url":"https://api.github.com/repos/apache/bookkeeper/subscribers","subscription_url":"https://api.github.com/repos/apache/bookkeeper/subscription","commits_url":"https://api.github.com/repos/apache/bookkeeper/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/bookkeeper/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/bookkeeper/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/bookkeeper/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/bookkeeper/contents/{+path}","compare_url":"https://api.github.com/repos/apache/bookkeeper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/bookkeeper/merges","archive_url":"https://api.github.com/repos/apache/bookkeeper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/bookkeeper/downloads","issues_url":"https://api.github.com/repos/apache/bookkeeper/issues{/number}","pulls_url":"https://api.github.com/repos/apache/bookkeeper/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/bookkeeper/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/bookkeeper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/bookkeeper/labels{/name}","releases_url":"https://api.github.com/repos/apache/bookkeeper/releases{/id}","deployments_url":"https://api.github.com/repos/apache/bookkeeper/deployments","created_at":"2011-04-06T07:00:07Z","updated_at":"2018-03-27T17:29:56Z","pushed_at":"2018-03-27T17:31:23Z","git_url":"git://github.com/apache/bookkeeper.git","ssh_url":"git@github.com:apache/bookkeeper.git","clone_url":"https://github.com/apache/bookkeeper.git","svn_url":"https://github.com/apache/bookkeeper","homepage":"https://bookkeeper.apache.org","size":26784,"stargazers_count":297,"watchers_count":297,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":156,"mirror_url":null,"archived":false,"open_issues_count":153,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":156,"open_issues":153,"watchers":297,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/bookkeeper/pulls/1281"},"html":{"href":"https://github.com/apache/bookkeeper/pull/1281"},"issue":{"href":"https://api.github.com/repos/apache/bookkeeper/issues/1281"},"comments":{"href":"https://api.github.com/repos/apache/bookkeeper/issues/1281/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/bookkeeper/pulls/1281/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/bookkeeper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/bookkeeper/pulls/1281/commits"},"statuses":{"href":"https://api.github.com/repos/apache/bookkeeper/statuses/1f45009f359bdfc3306d27fc149db48cf1a1c146"}},"author_association":"NONE"}}
{"actor":{"display_login":"sijie"}}