{"action":"created","comment":{"url":"https://api.github.com/repos/apache/kafka/pulls/comments/202448784","pull_request_review_id":137159427,"id":202448784,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMjQ0ODc4NA==","diff_hunk":"@@ -73,7 +73,17 @@ public void process(final K key, final Change<V> value) {\n             final V oldAgg = store.get(key);\n             V newAgg = oldAgg;\n \n-            // first try to add the new value\n+            // first remove the old value","path":"streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableReduce.java","position":5,"original_position":5,"commit_id":"58a0a13bdc373ffb8832748da9baad6f79634100","original_commit_id":"58a0a13bdc373ffb8832748da9baad6f79634100","user":{"login":"vvcephei","id":832787,"node_id":"MDQ6VXNlcjgzMjc4Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/832787?v=4","gravatar_id":"","url":"https://api.github.com/users/vvcephei","html_url":"https://github.com/vvcephei","followers_url":"https://api.github.com/users/vvcephei/followers","following_url":"https://api.github.com/users/vvcephei/following{/other_user}","gists_url":"https://api.github.com/users/vvcephei/gists{/gist_id}","starred_url":"https://api.github.com/users/vvcephei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vvcephei/subscriptions","organizations_url":"https://api.github.com/users/vvcephei/orgs","repos_url":"https://api.github.com/users/vvcephei/repos","events_url":"https://api.github.com/users/vvcephei/events{/privacy}","received_events_url":"https://api.github.com/users/vvcephei/received_events","type":"User","site_admin":false},"body":"I've moved this forward to exercise an extra condition: if my thinking is correct, we shouldn't need to (potentially) initialize the aggregate first. If oldValue is non-null, then we should have a non-null aggregate already in the state, period. If we observe anything different, then the state is inconsistent with the incoming stream, and something bad has happened. Like: either we lost the state or the topology changed.\r\n\r\nIs that right?\r\n\r\nClearly the prior code was more permissive, but it seems better in this case to be strict and fail fast, so we don't cause corrupted data to be sent downstream.","created_at":"2018-07-13T19:18:39Z","updated_at":"2018-07-13T19:18:40Z","html_url":"https://github.com/apache/kafka/pull/5366#discussion_r202448784","pull_request_url":"https://api.github.com/repos/apache/kafka/pulls/5366","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments/202448784"},"html":{"href":"https://github.com/apache/kafka/pull/5366#discussion_r202448784"},"pull_request":{"href":"https://api.github.com/repos/apache/kafka/pulls/5366"}}},"pull_request":{"url":"https://api.github.com/repos/apache/kafka/pulls/5366","id":201361369,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxMzYxMzY5","html_url":"https://github.com/apache/kafka/pull/5366","diff_url":"https://github.com/apache/kafka/pull/5366.diff","patch_url":"https://github.com/apache/kafka/pull/5366.patch","issue_url":"https://api.github.com/repos/apache/kafka/issues/5366","number":5366,"state":"open","locked":false,"title":"KAFKA-7161: check invariant: oldValue is in the state","user":{"login":"vvcephei","id":832787,"node_id":"MDQ6VXNlcjgzMjc4Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/832787?v=4","gravatar_id":"","url":"https://api.github.com/users/vvcephei","html_url":"https://github.com/vvcephei","followers_url":"https://api.github.com/users/vvcephei/followers","following_url":"https://api.github.com/users/vvcephei/following{/other_user}","gists_url":"https://api.github.com/users/vvcephei/gists{/gist_id}","starred_url":"https://api.github.com/users/vvcephei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vvcephei/subscriptions","organizations_url":"https://api.github.com/users/vvcephei/orgs","repos_url":"https://api.github.com/users/vvcephei/repos","events_url":"https://api.github.com/users/vvcephei/events{/privacy}","received_events_url":"https://api.github.com/users/vvcephei/received_events","type":"User","site_admin":false},"body":"\r\n\r\n### Committer Checklist (excluded from commit message)\r\n- [ ] Verify design and implementation \r\n- [ ] Verify test coverage and CI build status\r\n- [ ] Verify documentation (including upgrade notes)\r\n","created_at":"2018-07-13T18:04:41Z","updated_at":"2018-07-13T19:18:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5fbee011d1eae968da8b39377655ac5e9b736516","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/kafka/pulls/5366/commits","review_comments_url":"https://api.github.com/repos/apache/kafka/pulls/5366/comments","review_comment_url":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/kafka/issues/5366/comments","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/58a0a13bdc373ffb8832748da9baad6f79634100","head":{"label":"vvcephei:KAFKA-7161-check-reduce-invariant","ref":"KAFKA-7161-check-reduce-invariant","sha":"58a0a13bdc373ffb8832748da9baad6f79634100","user":{"login":"vvcephei","id":832787,"node_id":"MDQ6VXNlcjgzMjc4Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/832787?v=4","gravatar_id":"","url":"https://api.github.com/users/vvcephei","html_url":"https://github.com/vvcephei","followers_url":"https://api.github.com/users/vvcephei/followers","following_url":"https://api.github.com/users/vvcephei/following{/other_user}","gists_url":"https://api.github.com/users/vvcephei/gists{/gist_id}","starred_url":"https://api.github.com/users/vvcephei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vvcephei/subscriptions","organizations_url":"https://api.github.com/users/vvcephei/orgs","repos_url":"https://api.github.com/users/vvcephei/repos","events_url":"https://api.github.com/users/vvcephei/events{/privacy}","received_events_url":"https://api.github.com/users/vvcephei/received_events","type":"User","site_admin":false},"repo":{"id":124139257,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQxMzkyNTc=","name":"kafka","full_name":"vvcephei/kafka","owner":{"login":"vvcephei","id":832787,"node_id":"MDQ6VXNlcjgzMjc4Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/832787?v=4","gravatar_id":"","url":"https://api.github.com/users/vvcephei","html_url":"https://github.com/vvcephei","followers_url":"https://api.github.com/users/vvcephei/followers","following_url":"https://api.github.com/users/vvcephei/following{/other_user}","gists_url":"https://api.github.com/users/vvcephei/gists{/gist_id}","starred_url":"https://api.github.com/users/vvcephei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vvcephei/subscriptions","organizations_url":"https://api.github.com/users/vvcephei/orgs","repos_url":"https://api.github.com/users/vvcephei/repos","events_url":"https://api.github.com/users/vvcephei/events{/privacy}","received_events_url":"https://api.github.com/users/vvcephei/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vvcephei/kafka","description":"Mirror of Apache Kafka","fork":true,"url":"https://api.github.com/repos/vvcephei/kafka","forks_url":"https://api.github.com/repos/vvcephei/kafka/forks","keys_url":"https://api.github.com/repos/vvcephei/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vvcephei/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vvcephei/kafka/teams","hooks_url":"https://api.github.com/repos/vvcephei/kafka/hooks","issue_events_url":"https://api.github.com/repos/vvcephei/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/vvcephei/kafka/events","assignees_url":"https://api.github.com/repos/vvcephei/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/vvcephei/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/vvcephei/kafka/tags","blobs_url":"https://api.github.com/repos/vvcephei/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vvcephei/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vvcephei/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/vvcephei/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vvcephei/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/vvcephei/kafka/languages","stargazers_url":"https://api.github.com/repos/vvcephei/kafka/stargazers","contributors_url":"https://api.github.com/repos/vvcephei/kafka/contributors","subscribers_url":"https://api.github.com/repos/vvcephei/kafka/subscribers","subscription_url":"https://api.github.com/repos/vvcephei/kafka/subscription","commits_url":"https://api.github.com/repos/vvcephei/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/vvcephei/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/vvcephei/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/vvcephei/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/vvcephei/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/vvcephei/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vvcephei/kafka/merges","archive_url":"https://api.github.com/repos/vvcephei/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vvcephei/kafka/downloads","issues_url":"https://api.github.com/repos/vvcephei/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/vvcephei/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/vvcephei/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/vvcephei/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vvcephei/kafka/labels{/name}","releases_url":"https://api.github.com/repos/vvcephei/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/vvcephei/kafka/deployments","created_at":"2018-03-06T21:12:33Z","updated_at":"2018-04-05T14:43:40Z","pushed_at":"2018-07-13T18:03:45Z","git_url":"git://github.com/vvcephei/kafka.git","ssh_url":"git@github.com:vvcephei/kafka.git","clone_url":"https://github.com/vvcephei/kafka.git","svn_url":"https://github.com/vvcephei/kafka","homepage":null,"size":70610,"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":"trunk"}},"base":{"label":"apache:trunk","ref":"trunk","sha":"b68766017f11afd7e541fa84378d5e616cf1e81a","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":2211243,"node_id":"MDEwOlJlcG9zaXRvcnkyMjExMjQz","name":"kafka","full_name":"apache/kafka","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/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":"2018-07-13T18:55:45Z","pushed_at":"2018-07-13T18:20:47Z","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":70641,"stargazers_count":8925,"watchers_count":8925,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5123,"mirror_url":null,"archived":false,"open_issues_count":486,"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":5123,"open_issues":486,"watchers":8925,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/5366"},"html":{"href":"https://github.com/apache/kafka/pull/5366"},"issue":{"href":"https://api.github.com/repos/apache/kafka/issues/5366"},"comments":{"href":"https://api.github.com/repos/apache/kafka/issues/5366/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/kafka/pulls/5366/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/kafka/pulls/5366/commits"},"statuses":{"href":"https://api.github.com/repos/apache/kafka/statuses/58a0a13bdc373ffb8832748da9baad6f79634100"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"vvcephei"}}