{"action":"created","comment":{"url":"https://api.github.com/repos/apache/bookkeeper/pulls/comments/217523448","pull_request_review_id":155259024,"id":217523448,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNzUyMzQ0OA==","diff_hunk":"@@ -280,6 +369,17 @@ public Number getSample() {\n         this.taskExecutionStats = statsLogger.scope(name).getOpStatsLogger(\"task_execution\");\n         this.taskPendingStats = statsLogger.scope(name).getOpStatsLogger(\"task_queued\");\n         this.traceTaskExecution = traceTaskExecution;\n+        this.preserveMdcForTaskExecution = preserveMdcForTaskExecution;\n+    }\n+\n+    /**\n+     * Flag describing executor's expectation in regards of MDC.\n+     * All tasks submittedt through executor's submit/execute methods will automatically respect this.","path":"bookkeeper-common/src/main/java/org/apache/bookkeeper/common/util/OrderedExecutor.java","position":179,"original_position":179,"commit_id":"864d1be84d53f411169975aa55d7286bdc9c005a","original_commit_id":"864d1be84d53f411169975aa55d7286bdc9c005a","user":{"login":"jvrao","id":41390,"node_id":"MDQ6VXNlcjQxMzkw","avatar_url":"https://avatars1.githubusercontent.com/u/41390?v=4","gravatar_id":"","url":"https://api.github.com/users/jvrao","html_url":"https://github.com/jvrao","followers_url":"https://api.github.com/users/jvrao/followers","following_url":"https://api.github.com/users/jvrao/following{/other_user}","gists_url":"https://api.github.com/users/jvrao/gists{/gist_id}","starred_url":"https://api.github.com/users/jvrao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvrao/subscriptions","organizations_url":"https://api.github.com/users/jvrao/orgs","repos_url":"https://api.github.com/users/jvrao/repos","events_url":"https://api.github.com/users/jvrao/events{/privacy}","received_events_url":"https://api.github.com/users/jvrao/received_events","type":"User","site_admin":false},"body":"Nit: s/submittedt/submitted","created_at":"2018-09-13T20:29:33Z","updated_at":"2018-09-13T20:29:34Z","html_url":"https://github.com/apache/bookkeeper/pull/1672#discussion_r217523448","pull_request_url":"https://api.github.com/repos/apache/bookkeeper/pulls/1672","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/bookkeeper/pulls/comments/217523448"},"html":{"href":"https://github.com/apache/bookkeeper/pull/1672#discussion_r217523448"},"pull_request":{"href":"https://api.github.com/repos/apache/bookkeeper/pulls/1672"}}},"pull_request":{"url":"https://api.github.com/repos/apache/bookkeeper/pulls/1672","id":214518336,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0NTE4MzM2","html_url":"https://github.com/apache/bookkeeper/pull/1672","diff_url":"https://github.com/apache/bookkeeper/pull/1672.diff","patch_url":"https://github.com/apache/bookkeeper/pull/1672.patch","issue_url":"https://api.github.com/repos/apache/bookkeeper/issues/1672","number":1672,"state":"open","locked":false,"title":"Issue #850: Added request context across client and bookies.","user":{"login":"dlg99","id":8622884,"node_id":"MDQ6VXNlcjg2MjI4ODQ=","avatar_url":"https://avatars0.githubusercontent.com/u/8622884?v=4","gravatar_id":"","url":"https://api.github.com/users/dlg99","html_url":"https://github.com/dlg99","followers_url":"https://api.github.com/users/dlg99/followers","following_url":"https://api.github.com/users/dlg99/following{/other_user}","gists_url":"https://api.github.com/users/dlg99/gists{/gist_id}","starred_url":"https://api.github.com/users/dlg99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlg99/subscriptions","organizations_url":"https://api.github.com/users/dlg99/orgs","repos_url":"https://api.github.com/users/dlg99/repos","events_url":"https://api.github.com/users/dlg99/events{/privacy}","received_events_url":"https://api.github.com/users/dlg99/received_events","type":"User","site_admin":false},"body":"Descriptions of the changes in this PR:\r\n\r\n - MDC context is passed to runnables, callables etc.\r\n - protocol extended, context is sent to bookie servers, restored there and back on client with the response.\r\n   Hopefully did not miss some nuance on the server side, largely rely on changes in ordered executors to do all the magic.\r\n - did microbenchmarking of the protocol changes (strings added to protobuf, MDC context preserved/restored). Looks ok.\r\n - added unit tests.\r\n\r\n(@bug W-5291641@) \r\n(@bug W-5291648@)\r\n\r\n\r\n### Motivation\r\n\r\nTroubleshooting of request-level failures/errors can be simplified if request id was passed through all the stages of the request, from threadpools on the client to bookies to the response back on the client. \r\nLog4j/Slf4j allows logging of MDC data so it makes sense to use this functionality for logging.\r\n\r\n### Changes\r\n\r\n - MDC context is passed to runnables, callables etc.\r\n - protocol extended, context is sent to bookie servers, restored there and back on client with the response.\r\n   Hopefully did not miss some nuance on the server side, largely rely on changes in ordered executors to do all the magic.\r\n - did microbenchmarking of the protocol changes (strings added to protobuf, MDC context preserved/restored). Looks ok.\r\n - added unit tests.\r\n\r\nMaster Issue: #850 \r\n\r\n> ---\r\n> In order to uphold a high standard for quality for code contributions, Apache BookKeeper runs various precommit\r\n> checks for pull requests. A pull request can only be merged when it passes precommit checks. However running all\r\n> the precommit checks can take a long time, some trivial changes don't need to run all the precommit checks. You\r\n> can check following list to skip the tests that don't need to run for your pull request. Leave them unchecked if\r\n> you are not sure, committers will help you:\r\n>\r\n> - [ ] [skip bookkeeper-server bookie tests]: skip testing `org.apache.bookkeeper.bookie` in bookkeeper-server module.\r\n> - [ ] [skip bookkeeper-server client tests]: skip testing `org.apache.bookkeeper.client` in bookkeeper-server module.\r\n> - [ ] [skip bookkeeper-server replication tests]: skip testing `org.apache.bookkeeper.replication` in bookkeeper-server module.\r\n> - [ ] [skip bookkeeper-server tls tests]: skip testing `org.apache.bookkeeper.tls` in bookkeeper-server module.\r\n> - [ ] [skip bookkeeper-server remaining tests]: skip testing all other tests in bookkeeper-server module.\r\n> - [ ] [skip integration tests]: skip docker based integration tests. if you make java code changes, you shouldn't skip integration tests.\r\n> - [ ] [skip build java8]: skip build on java8. *ONLY* skip this when *ONLY* changing files under documentation under `site`.\r\n> - [ ] [skip build java9]: skip build on java9. *ONLY* skip this when *ONLY* changing files under documentation under `site`.\r\n> ---\r\n\r\n> ---\r\n> Be sure to do all of the following to help us incorporate your contribution\r\n> quickly and easily:\r\n>\r\n> If this PR is a BookKeeper Proposal (BP):\r\n>\r\n> - [ ] Make sure the PR title is formatted like:\r\n>     `<BP-#>: Description of bookkeeper proposal`\r\n>     `e.g. BP-1: 64 bits ledger is support`\r\n> - [ ] Attach the master issue link in the description of this PR.\r\n> - [ ] Attach the google doc link if the BP is written in Google Doc.\r\n>\r\n> Otherwise:\r\n> \r\n> - [ ] Make sure the PR title is formatted like:\r\n>     `<Issue #>: Description of pull request`\r\n>     `e.g. Issue 123: Description ...`\r\n> - [ ] Make sure tests pass via `mvn clean apache-rat:check install spotbugs:check`.\r\n> - [ ] Replace `<Issue #>` in the title with the actual Issue number.\r\n> \r\n> ---\r\n","created_at":"2018-09-11T05:46:33Z","updated_at":"2018-09-13T20:29:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"18e15000c606365e2ef3a7bd92dd9ea84a21c3ce","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/bookkeeper/pulls/1672/commits","review_comments_url":"https://api.github.com/repos/apache/bookkeeper/pulls/1672/comments","review_comment_url":"https://api.github.com/repos/apache/bookkeeper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/bookkeeper/issues/1672/comments","statuses_url":"https://api.github.com/repos/apache/bookkeeper/statuses/864d1be84d53f411169975aa55d7286bdc9c005a","head":{"label":"dlg99:feature/correlation_id","ref":"feature/correlation_id","sha":"864d1be84d53f411169975aa55d7286bdc9c005a","user":{"login":"dlg99","id":8622884,"node_id":"MDQ6VXNlcjg2MjI4ODQ=","avatar_url":"https://avatars0.githubusercontent.com/u/8622884?v=4","gravatar_id":"","url":"https://api.github.com/users/dlg99","html_url":"https://github.com/dlg99","followers_url":"https://api.github.com/users/dlg99/followers","following_url":"https://api.github.com/users/dlg99/following{/other_user}","gists_url":"https://api.github.com/users/dlg99/gists{/gist_id}","starred_url":"https://api.github.com/users/dlg99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlg99/subscriptions","organizations_url":"https://api.github.com/users/dlg99/orgs","repos_url":"https://api.github.com/users/dlg99/repos","events_url":"https://api.github.com/users/dlg99/events{/privacy}","received_events_url":"https://api.github.com/users/dlg99/received_events","type":"User","site_admin":false},"repo":{"id":55713096,"node_id":"MDEwOlJlcG9zaXRvcnk1NTcxMzA5Ng==","name":"bookkeeper","full_name":"dlg99/bookkeeper","owner":{"login":"dlg99","id":8622884,"node_id":"MDQ6VXNlcjg2MjI4ODQ=","avatar_url":"https://avatars0.githubusercontent.com/u/8622884?v=4","gravatar_id":"","url":"https://api.github.com/users/dlg99","html_url":"https://github.com/dlg99","followers_url":"https://api.github.com/users/dlg99/followers","following_url":"https://api.github.com/users/dlg99/following{/other_user}","gists_url":"https://api.github.com/users/dlg99/gists{/gist_id}","starred_url":"https://api.github.com/users/dlg99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlg99/subscriptions","organizations_url":"https://api.github.com/users/dlg99/orgs","repos_url":"https://api.github.com/users/dlg99/repos","events_url":"https://api.github.com/users/dlg99/events{/privacy}","received_events_url":"https://api.github.com/users/dlg99/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dlg99/bookkeeper","description":"Mirror of Apache Bookkeeper","fork":true,"url":"https://api.github.com/repos/dlg99/bookkeeper","forks_url":"https://api.github.com/repos/dlg99/bookkeeper/forks","keys_url":"https://api.github.com/repos/dlg99/bookkeeper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dlg99/bookkeeper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dlg99/bookkeeper/teams","hooks_url":"https://api.github.com/repos/dlg99/bookkeeper/hooks","issue_events_url":"https://api.github.com/repos/dlg99/bookkeeper/issues/events{/number}","events_url":"https://api.github.com/repos/dlg99/bookkeeper/events","assignees_url":"https://api.github.com/repos/dlg99/bookkeeper/assignees{/user}","branches_url":"https://api.github.com/repos/dlg99/bookkeeper/branches{/branch}","tags_url":"https://api.github.com/repos/dlg99/bookkeeper/tags","blobs_url":"https://api.github.com/repos/dlg99/bookkeeper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dlg99/bookkeeper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dlg99/bookkeeper/git/refs{/sha}","trees_url":"https://api.github.com/repos/dlg99/bookkeeper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dlg99/bookkeeper/statuses/{sha}","languages_url":"https://api.github.com/repos/dlg99/bookkeeper/languages","stargazers_url":"https://api.github.com/repos/dlg99/bookkeeper/stargazers","contributors_url":"https://api.github.com/repos/dlg99/bookkeeper/contributors","subscribers_url":"https://api.github.com/repos/dlg99/bookkeeper/subscribers","subscription_url":"https://api.github.com/repos/dlg99/bookkeeper/subscription","commits_url":"https://api.github.com/repos/dlg99/bookkeeper/commits{/sha}","git_commits_url":"https://api.github.com/repos/dlg99/bookkeeper/git/commits{/sha}","comments_url":"https://api.github.com/repos/dlg99/bookkeeper/comments{/number}","issue_comment_url":"https://api.github.com/repos/dlg99/bookkeeper/issues/comments{/number}","contents_url":"https://api.github.com/repos/dlg99/bookkeeper/contents/{+path}","compare_url":"https://api.github.com/repos/dlg99/bookkeeper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dlg99/bookkeeper/merges","archive_url":"https://api.github.com/repos/dlg99/bookkeeper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dlg99/bookkeeper/downloads","issues_url":"https://api.github.com/repos/dlg99/bookkeeper/issues{/number}","pulls_url":"https://api.github.com/repos/dlg99/bookkeeper/pulls{/number}","milestones_url":"https://api.github.com/repos/dlg99/bookkeeper/milestones{/number}","notifications_url":"https://api.github.com/repos/dlg99/bookkeeper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dlg99/bookkeeper/labels{/name}","releases_url":"https://api.github.com/repos/dlg99/bookkeeper/releases{/id}","deployments_url":"https://api.github.com/repos/dlg99/bookkeeper/deployments","created_at":"2016-04-07T17:10:00Z","updated_at":"2018-09-11T20:30:29Z","pushed_at":"2018-09-11T20:30:24Z","git_url":"git://github.com/dlg99/bookkeeper.git","ssh_url":"git@github.com:dlg99/bookkeeper.git","clone_url":"https://github.com/dlg99/bookkeeper.git","svn_url":"https://github.com/dlg99/bookkeeper","homepage":null,"size":20318,"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":{"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":"master"}},"base":{"label":"apache:master","ref":"master","sha":"052908ef30818d9f1e6be56bf3a3e3083c5bd6fb","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","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,"node_id":"MDEwOlJlcG9zaXRvcnkxNTc1OTU2","name":"bookkeeper","full_name":"apache/bookkeeper","owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","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-09-13T13:16:08Z","pushed_at":"2018-09-12T21:06:51Z","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":35029,"stargazers_count":407,"watchers_count":407,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":188,"mirror_url":null,"archived":false,"open_issues_count":169,"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":188,"open_issues":169,"watchers":407,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/bookkeeper/pulls/1672"},"html":{"href":"https://github.com/apache/bookkeeper/pull/1672"},"issue":{"href":"https://api.github.com/repos/apache/bookkeeper/issues/1672"},"comments":{"href":"https://api.github.com/repos/apache/bookkeeper/issues/1672/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/bookkeeper/pulls/1672/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/bookkeeper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/bookkeeper/pulls/1672/commits"},"statuses":{"href":"https://api.github.com/repos/apache/bookkeeper/statuses/864d1be84d53f411169975aa55d7286bdc9c005a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jvrao"}}