{"action":"created","comment":{"url":"https://api.github.com/repos/apache/kafka/pulls/comments/58818420","id":58818420,"diff_hunk":"@@ -43,6 +43,8 @@\n \n     private static final Logger log = LoggerFactory.getLogger(StreamTask.class);\n \n+    private static final ConsumerRecord<Object, Object> DUMMY_RECORD = new ConsumerRecord<>(\"__null_topic__\", -1, -1L, null, null);","path":"streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java","position":4,"original_position":4,"commit_id":"a915f114ec74f1c6245bb87643b2dfa6cf4c46a7","original_commit_id":"a915f114ec74f1c6245bb87643b2dfa6cf4c46a7","user":{"login":"ewencp","id":47366,"avatar_url":"https://avatars.githubusercontent.com/u/47366?v=3","gravatar_id":"","url":"https://api.github.com/users/ewencp","html_url":"https://github.com/ewencp","followers_url":"https://api.github.com/users/ewencp/followers","following_url":"https://api.github.com/users/ewencp/following{/other_user}","gists_url":"https://api.github.com/users/ewencp/gists{/gist_id}","starred_url":"https://api.github.com/users/ewencp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewencp/subscriptions","organizations_url":"https://api.github.com/users/ewencp/orgs","repos_url":"https://api.github.com/users/ewencp/repos","events_url":"https://api.github.com/users/ewencp/events{/privacy}","received_events_url":"https://api.github.com/users/ewencp/received_events","type":"User","site_admin":false},"body":"This doesn't seem to conform to the comments in `ProcessorContext`. Specifically, the topic is not null and the timestamp will be `NO_TIMESTAMP`. Nothing is wrong with that for `DUMMY_RECORD` itself, but it looks like `ProcessorContext` is implemented by `ProcessorContextImpl` and `StandbyContextImpl`. I only looked into `ProcessorContextImpl` so far, but the methods mentioned (along with `partition` and `offset`, which seem to behave properly) just forward the request to `currRecord` (which is `task.record()` in those classes). Since `currRecord = DUMMY_RECORD` during the `punctuate` call, they will return the wrong values.\r\n\r\nI think we probably need unit tests for these methods during a call to punctuate to properly test this behavior.","created_at":"2016-04-07T04:38:49Z","updated_at":"2016-04-07T04:38:49Z","html_url":"https://github.com/apache/kafka/pull/1190#discussion_r58818420","pull_request_url":"https://api.github.com/repos/apache/kafka/pulls/1190","_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments/58818420"},"html":{"href":"https://github.com/apache/kafka/pull/1190#discussion_r58818420"},"pull_request":{"href":"https://api.github.com/repos/apache/kafka/pulls/1190"}}},"pull_request":{"url":"https://api.github.com/repos/apache/kafka/pulls/1190","id":65381241,"html_url":"https://github.com/apache/kafka/pull/1190","diff_url":"https://github.com/apache/kafka/pull/1190.diff","patch_url":"https://github.com/apache/kafka/pull/1190.patch","issue_url":"https://api.github.com/repos/apache/kafka/issues/1190","number":1190,"state":"open","locked":false,"title":"KAFKA-3505: Fix punctuate generated record metadata","user":{"login":"guozhangwang","id":10729597,"avatar_url":"https://avatars.githubusercontent.com/u/10729597?v=3","gravatar_id":"","url":"https://api.github.com/users/guozhangwang","html_url":"https://github.com/guozhangwang","followers_url":"https://api.github.com/users/guozhangwang/followers","following_url":"https://api.github.com/users/guozhangwang/following{/other_user}","gists_url":"https://api.github.com/users/guozhangwang/gists{/gist_id}","starred_url":"https://api.github.com/users/guozhangwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guozhangwang/subscriptions","organizations_url":"https://api.github.com/users/guozhangwang/orgs","repos_url":"https://api.github.com/users/guozhangwang/repos","events_url":"https://api.github.com/users/guozhangwang/events{/privacy}","received_events_url":"https://api.github.com/users/guozhangwang/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-05T22:21:51Z","updated_at":"2016-04-07T04:38:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a552915d616ba032951e68add0c126544efceec8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/kafka/pulls/1190/commits","review_comments_url":"https://api.github.com/repos/apache/kafka/pulls/1190/comments","review_comment_url":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/kafka/issues/1190/comments","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/a915f114ec74f1c6245bb87643b2dfa6cf4c46a7","head":{"label":"guozhangwang:K3505","ref":"K3505","sha":"a915f114ec74f1c6245bb87643b2dfa6cf4c46a7","user":{"login":"guozhangwang","id":10729597,"avatar_url":"https://avatars.githubusercontent.com/u/10729597?v=3","gravatar_id":"","url":"https://api.github.com/users/guozhangwang","html_url":"https://github.com/guozhangwang","followers_url":"https://api.github.com/users/guozhangwang/followers","following_url":"https://api.github.com/users/guozhangwang/following{/other_user}","gists_url":"https://api.github.com/users/guozhangwang/gists{/gist_id}","starred_url":"https://api.github.com/users/guozhangwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guozhangwang/subscriptions","organizations_url":"https://api.github.com/users/guozhangwang/orgs","repos_url":"https://api.github.com/users/guozhangwang/repos","events_url":"https://api.github.com/users/guozhangwang/events{/privacy}","received_events_url":"https://api.github.com/users/guozhangwang/received_events","type":"User","site_admin":false},"repo":{"id":39164613,"name":"kafka","full_name":"guozhangwang/kafka","owner":{"login":"guozhangwang","id":10729597,"avatar_url":"https://avatars.githubusercontent.com/u/10729597?v=3","gravatar_id":"","url":"https://api.github.com/users/guozhangwang","html_url":"https://github.com/guozhangwang","followers_url":"https://api.github.com/users/guozhangwang/followers","following_url":"https://api.github.com/users/guozhangwang/following{/other_user}","gists_url":"https://api.github.com/users/guozhangwang/gists{/gist_id}","starred_url":"https://api.github.com/users/guozhangwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guozhangwang/subscriptions","organizations_url":"https://api.github.com/users/guozhangwang/orgs","repos_url":"https://api.github.com/users/guozhangwang/repos","events_url":"https://api.github.com/users/guozhangwang/events{/privacy}","received_events_url":"https://api.github.com/users/guozhangwang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/guozhangwang/kafka","description":"Mirror of Apache Kafka","fork":true,"url":"https://api.github.com/repos/guozhangwang/kafka","forks_url":"https://api.github.com/repos/guozhangwang/kafka/forks","keys_url":"https://api.github.com/repos/guozhangwang/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guozhangwang/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guozhangwang/kafka/teams","hooks_url":"https://api.github.com/repos/guozhangwang/kafka/hooks","issue_events_url":"https://api.github.com/repos/guozhangwang/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/guozhangwang/kafka/events","assignees_url":"https://api.github.com/repos/guozhangwang/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/guozhangwang/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/guozhangwang/kafka/tags","blobs_url":"https://api.github.com/repos/guozhangwang/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guozhangwang/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guozhangwang/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/guozhangwang/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guozhangwang/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/guozhangwang/kafka/languages","stargazers_url":"https://api.github.com/repos/guozhangwang/kafka/stargazers","contributors_url":"https://api.github.com/repos/guozhangwang/kafka/contributors","subscribers_url":"https://api.github.com/repos/guozhangwang/kafka/subscribers","subscription_url":"https://api.github.com/repos/guozhangwang/kafka/subscription","commits_url":"https://api.github.com/repos/guozhangwang/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/guozhangwang/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/guozhangwang/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/guozhangwang/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/guozhangwang/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/guozhangwang/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guozhangwang/kafka/merges","archive_url":"https://api.github.com/repos/guozhangwang/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guozhangwang/kafka/downloads","issues_url":"https://api.github.com/repos/guozhangwang/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/guozhangwang/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/guozhangwang/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/guozhangwang/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guozhangwang/kafka/labels{/name}","releases_url":"https://api.github.com/repos/guozhangwang/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/guozhangwang/kafka/deployments","created_at":"2015-07-15T22:40:38Z","updated_at":"2016-01-13T20:28:18Z","pushed_at":"2016-04-07T02:21:08Z","git_url":"git://github.com/guozhangwang/kafka.git","ssh_url":"git@github.com:guozhangwang/kafka.git","clone_url":"https://github.com/guozhangwang/kafka.git","svn_url":"https://github.com/guozhangwang/kafka","homepage":null,"size":31656,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"trunk"}},"base":{"label":"apache:trunk","ref":"trunk","sha":"8218a4a153d9138f29486e74cf77c88d1786997a","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","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":2211243,"name":"kafka","full_name":"apache/kafka","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","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/kafka","description":"Mirror of Apache Kafka","fork":false,"url":"https://api.github.com/repos/apache/kafka","forks_url":"https://api.github.com/repos/apache/kafka/forks","keys_url":"https://api.github.com/repos/apache/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/kafka/teams","hooks_url":"https://api.github.com/repos/apache/kafka/hooks","issue_events_url":"https://api.github.com/repos/apache/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/apache/kafka/events","assignees_url":"https://api.github.com/repos/apache/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/apache/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/apache/kafka/tags","blobs_url":"https://api.github.com/repos/apache/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/kafka/languages","stargazers_url":"https://api.github.com/repos/apache/kafka/stargazers","contributors_url":"https://api.github.com/repos/apache/kafka/contributors","subscribers_url":"https://api.github.com/repos/apache/kafka/subscribers","subscription_url":"https://api.github.com/repos/apache/kafka/subscription","commits_url":"https://api.github.com/repos/apache/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/apache/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/kafka/merges","archive_url":"https://api.github.com/repos/apache/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/kafka/downloads","issues_url":"https://api.github.com/repos/apache/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/apache/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/kafka/labels{/name}","releases_url":"https://api.github.com/repos/apache/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/apache/kafka/deployments","created_at":"2011-08-15T18:06:16Z","updated_at":"2016-04-06T21:30:26Z","pushed_at":"2016-04-07T02:21:39Z","git_url":"git://github.com/apache/kafka.git","ssh_url":"git@github.com:apache/kafka.git","clone_url":"https://github.com/apache/kafka.git","svn_url":"https://github.com/apache/kafka","homepage":null,"size":38879,"stargazers_count":2910,"watchers_count":2910,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1749,"mirror_url":"git://git.apache.org/kafka.git","open_issues_count":175,"forks":1749,"open_issues":175,"watchers":2910,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/1190"},"html":{"href":"https://github.com/apache/kafka/pull/1190"},"issue":{"href":"https://api.github.com/repos/apache/kafka/issues/1190"},"comments":{"href":"https://api.github.com/repos/apache/kafka/issues/1190/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/kafka/pulls/1190/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/kafka/pulls/1190/commits"},"statuses":{"href":"https://api.github.com/repos/apache/kafka/statuses/a915f114ec74f1c6245bb87643b2dfa6cf4c46a7"}}}}