{"action":"created","comment":{"url":"https://api.github.com/repos/eclipse/californium/pulls/comments/120472904","pull_request_review_id":42438944,"id":120472904,"diff_hunk":"@@ -396,11 +398,12 @@ public void completed(final Exchange exchange) {\n \n \t\t@Override\n \t\tpublic void contextEstablished(final Exchange exchange) {\n-\n-\t\t\tif (exchange.getRequest() != null) {\n-\t\t\t\tobservationStore.setContext(exchange.getRequest().getToken(), exchange.getCorrelationContext());\n+\t\t\tRequest currentRequest = exchange.getCurrentRequest(); \n+\t\t\tRequest request = exchange.getRequest(); \n+\t\t\tif (request == currentRequest && request != null && request.isObserve()) {\n+\t\t\t\tobservationStore.setContext(request.getToken(), exchange.getCorrelationContext());","path":"californium-core/src/main/java/org/eclipse/californium/core/network/UdpMatcher.java","position":19,"original_position":19,"commit_id":"580f7e6b68f433e3645205ccabcf5418023ed193","original_commit_id":"d7dae1dc7e75852c6e41bf6d1d9e6acc2a244ec3","user":{"login":"boaks","id":10937819,"avatar_url":"https://avatars1.githubusercontent.com/u/10937819?v=3","gravatar_id":"","url":"https://api.github.com/users/boaks","html_url":"https://github.com/boaks","followers_url":"https://api.github.com/users/boaks/followers","following_url":"https://api.github.com/users/boaks/following{/other_user}","gists_url":"https://api.github.com/users/boaks/gists{/gist_id}","starred_url":"https://api.github.com/users/boaks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boaks/subscriptions","organizations_url":"https://api.github.com/users/boaks/orgs","repos_url":"https://api.github.com/users/boaks/repos","events_url":"https://api.github.com/users/boaks/events{/privacy}","received_events_url":"https://api.github.com/users/boaks/received_events","type":"User","site_admin":false},"body":"I used `XyzStorage` for both `ObservationStore `and `MessageExchangeStore`.\r\n\r\nCurrently, I've only saw implementation for observes (californium and leshan). \r\n\r\nhttps://github.com/eclipse/californium/issues/311#issuecomment-305957631\r\n\r\nI think together \"for all request\" and \"processing must be completed before returning\" this is very dangerous for the performance. Therefore I would go for changing the setContext API to enable the implementation to select the way of processing the context (currently only filter for observes).","created_at":"2017-06-06T20:33:22Z","updated_at":"2017-06-06T20:33:22Z","html_url":"https://github.com/eclipse/californium/pull/314#discussion_r120472904","pull_request_url":"https://api.github.com/repos/eclipse/californium/pulls/314","_links":{"self":{"href":"https://api.github.com/repos/eclipse/californium/pulls/comments/120472904"},"html":{"href":"https://github.com/eclipse/californium/pull/314#discussion_r120472904"},"pull_request":{"href":"https://api.github.com/repos/eclipse/californium/pulls/314"}}},"pull_request":{"url":"https://api.github.com/repos/eclipse/californium/pulls/314","id":122883188,"html_url":"https://github.com/eclipse/californium/pull/314","diff_url":"https://github.com/eclipse/californium/pull/314.diff","patch_url":"https://github.com/eclipse/californium/pull/314.patch","issue_url":"https://api.github.com/repos/eclipse/californium/issues/314","number":314,"state":"open","locked":false,"title":"Optimize correlation context processing.","user":{"login":"boaks","id":10937819,"avatar_url":"https://avatars1.githubusercontent.com/u/10937819?v=3","gravatar_id":"","url":"https://api.github.com/users/boaks","html_url":"https://github.com/boaks","followers_url":"https://api.github.com/users/boaks/followers","following_url":"https://api.github.com/users/boaks/following{/other_user}","gists_url":"https://api.github.com/users/boaks/gists{/gist_id}","starred_url":"https://api.github.com/users/boaks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boaks/subscriptions","organizations_url":"https://api.github.com/users/boaks/orgs","repos_url":"https://api.github.com/users/boaks/repos","events_url":"https://api.github.com/users/boaks/events{/privacy}","received_events_url":"https://api.github.com/users/boaks/received_events","type":"User","site_admin":false},"body":"Set correlation context in observe store only for observes. Issue #311\r\n\r\nSigned-off-by: Achim Kraus <achim.kraus@bosch-si.com>","created_at":"2017-05-29T12:12:30Z","updated_at":"2017-06-06T20:33:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fdcc283178cbd23b7c810d111d8d7afcbb1c709e","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/eclipse/californium/pulls/314/commits","review_comments_url":"https://api.github.com/repos/eclipse/californium/pulls/314/comments","review_comment_url":"https://api.github.com/repos/eclipse/californium/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eclipse/californium/issues/314/comments","statuses_url":"https://api.github.com/repos/eclipse/californium/statuses/580f7e6b68f433e3645205ccabcf5418023ed193","head":{"label":"bsinno:issue_311","ref":"issue_311","sha":"580f7e6b68f433e3645205ccabcf5418023ed193","user":{"login":"bsinno","id":9215699,"avatar_url":"https://avatars0.githubusercontent.com/u/9215699?v=3","gravatar_id":"","url":"https://api.github.com/users/bsinno","html_url":"https://github.com/bsinno","followers_url":"https://api.github.com/users/bsinno/followers","following_url":"https://api.github.com/users/bsinno/following{/other_user}","gists_url":"https://api.github.com/users/bsinno/gists{/gist_id}","starred_url":"https://api.github.com/users/bsinno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsinno/subscriptions","organizations_url":"https://api.github.com/users/bsinno/orgs","repos_url":"https://api.github.com/users/bsinno/repos","events_url":"https://api.github.com/users/bsinno/events{/privacy}","received_events_url":"https://api.github.com/users/bsinno/received_events","type":"Organization","site_admin":false},"repo":{"id":52429243,"name":"californium","full_name":"bsinno/californium","owner":{"login":"bsinno","id":9215699,"avatar_url":"https://avatars0.githubusercontent.com/u/9215699?v=3","gravatar_id":"","url":"https://api.github.com/users/bsinno","html_url":"https://github.com/bsinno","followers_url":"https://api.github.com/users/bsinno/followers","following_url":"https://api.github.com/users/bsinno/following{/other_user}","gists_url":"https://api.github.com/users/bsinno/gists{/gist_id}","starred_url":"https://api.github.com/users/bsinno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsinno/subscriptions","organizations_url":"https://api.github.com/users/bsinno/orgs","repos_url":"https://api.github.com/users/bsinno/repos","events_url":"https://api.github.com/users/bsinno/events{/privacy}","received_events_url":"https://api.github.com/users/bsinno/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bsinno/californium","description":null,"fork":true,"url":"https://api.github.com/repos/bsinno/californium","forks_url":"https://api.github.com/repos/bsinno/californium/forks","keys_url":"https://api.github.com/repos/bsinno/californium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bsinno/californium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bsinno/californium/teams","hooks_url":"https://api.github.com/repos/bsinno/californium/hooks","issue_events_url":"https://api.github.com/repos/bsinno/californium/issues/events{/number}","events_url":"https://api.github.com/repos/bsinno/californium/events","assignees_url":"https://api.github.com/repos/bsinno/californium/assignees{/user}","branches_url":"https://api.github.com/repos/bsinno/californium/branches{/branch}","tags_url":"https://api.github.com/repos/bsinno/californium/tags","blobs_url":"https://api.github.com/repos/bsinno/californium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bsinno/californium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bsinno/californium/git/refs{/sha}","trees_url":"https://api.github.com/repos/bsinno/californium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bsinno/californium/statuses/{sha}","languages_url":"https://api.github.com/repos/bsinno/californium/languages","stargazers_url":"https://api.github.com/repos/bsinno/californium/stargazers","contributors_url":"https://api.github.com/repos/bsinno/californium/contributors","subscribers_url":"https://api.github.com/repos/bsinno/californium/subscribers","subscription_url":"https://api.github.com/repos/bsinno/californium/subscription","commits_url":"https://api.github.com/repos/bsinno/californium/commits{/sha}","git_commits_url":"https://api.github.com/repos/bsinno/californium/git/commits{/sha}","comments_url":"https://api.github.com/repos/bsinno/californium/comments{/number}","issue_comment_url":"https://api.github.com/repos/bsinno/californium/issues/comments{/number}","contents_url":"https://api.github.com/repos/bsinno/californium/contents/{+path}","compare_url":"https://api.github.com/repos/bsinno/californium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bsinno/californium/merges","archive_url":"https://api.github.com/repos/bsinno/californium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bsinno/californium/downloads","issues_url":"https://api.github.com/repos/bsinno/californium/issues{/number}","pulls_url":"https://api.github.com/repos/bsinno/californium/pulls{/number}","milestones_url":"https://api.github.com/repos/bsinno/californium/milestones{/number}","notifications_url":"https://api.github.com/repos/bsinno/californium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bsinno/californium/labels{/name}","releases_url":"https://api.github.com/repos/bsinno/californium/releases{/id}","deployments_url":"https://api.github.com/repos/bsinno/californium/deployments","created_at":"2016-02-24T09:13:26Z","updated_at":"2016-02-24T09:13:28Z","pushed_at":"2017-06-01T08:18:04Z","git_url":"git://github.com/bsinno/californium.git","ssh_url":"git@github.com:bsinno/californium.git","clone_url":"https://github.com/bsinno/californium.git","svn_url":"https://github.com/bsinno/californium","homepage":null,"size":4817,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"eclipse:2.0.x","ref":"2.0.x","sha":"d4d10960fe95295900201fe5843d9c920d9758b6","user":{"login":"eclipse","id":56974,"avatar_url":"https://avatars2.githubusercontent.com/u/56974?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"repo":{"id":43075480,"name":"californium","full_name":"eclipse/californium","owner":{"login":"eclipse","id":56974,"avatar_url":"https://avatars2.githubusercontent.com/u/56974?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eclipse/californium","description":null,"fork":false,"url":"https://api.github.com/repos/eclipse/californium","forks_url":"https://api.github.com/repos/eclipse/californium/forks","keys_url":"https://api.github.com/repos/eclipse/californium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipse/californium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipse/californium/teams","hooks_url":"https://api.github.com/repos/eclipse/californium/hooks","issue_events_url":"https://api.github.com/repos/eclipse/californium/issues/events{/number}","events_url":"https://api.github.com/repos/eclipse/californium/events","assignees_url":"https://api.github.com/repos/eclipse/californium/assignees{/user}","branches_url":"https://api.github.com/repos/eclipse/californium/branches{/branch}","tags_url":"https://api.github.com/repos/eclipse/californium/tags","blobs_url":"https://api.github.com/repos/eclipse/californium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipse/californium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipse/californium/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipse/californium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipse/californium/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipse/californium/languages","stargazers_url":"https://api.github.com/repos/eclipse/californium/stargazers","contributors_url":"https://api.github.com/repos/eclipse/californium/contributors","subscribers_url":"https://api.github.com/repos/eclipse/californium/subscribers","subscription_url":"https://api.github.com/repos/eclipse/californium/subscription","commits_url":"https://api.github.com/repos/eclipse/californium/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipse/californium/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipse/californium/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipse/californium/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipse/californium/contents/{+path}","compare_url":"https://api.github.com/repos/eclipse/californium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipse/californium/merges","archive_url":"https://api.github.com/repos/eclipse/californium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipse/californium/downloads","issues_url":"https://api.github.com/repos/eclipse/californium/issues{/number}","pulls_url":"https://api.github.com/repos/eclipse/californium/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipse/californium/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipse/californium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipse/californium/labels{/name}","releases_url":"https://api.github.com/repos/eclipse/californium/releases{/id}","deployments_url":"https://api.github.com/repos/eclipse/californium/deployments","created_at":"2015-09-24T15:27:15Z","updated_at":"2017-06-03T07:34:42Z","pushed_at":"2017-06-06T16:58:50Z","git_url":"git://github.com/eclipse/californium.git","ssh_url":"git@github.com:eclipse/californium.git","clone_url":"https://github.com/eclipse/californium.git","svn_url":"https://github.com/eclipse/californium","homepage":null,"size":4882,"stargazers_count":124,"watchers_count":124,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":102,"mirror_url":null,"open_issues_count":42,"forks":102,"open_issues":42,"watchers":124,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eclipse/californium/pulls/314"},"html":{"href":"https://github.com/eclipse/californium/pull/314"},"issue":{"href":"https://api.github.com/repos/eclipse/californium/issues/314"},"comments":{"href":"https://api.github.com/repos/eclipse/californium/issues/314/comments"},"review_comments":{"href":"https://api.github.com/repos/eclipse/californium/pulls/314/comments"},"review_comment":{"href":"https://api.github.com/repos/eclipse/californium/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eclipse/californium/pulls/314/commits"},"statuses":{"href":"https://api.github.com/repos/eclipse/californium/statuses/580f7e6b68f433e3645205ccabcf5418023ed193"}}}}
{"actor":{"display_login":"boaks"}}