{"action":"created","issue":{"url":"https://api.github.com/repos/apache/kafka/issues/4495","repository_url":"https://api.github.com/repos/apache/kafka","labels_url":"https://api.github.com/repos/apache/kafka/issues/4495/labels{/name}","comments_url":"https://api.github.com/repos/apache/kafka/issues/4495/comments","events_url":"https://api.github.com/repos/apache/kafka/issues/4495/events","html_url":"https://github.com/apache/kafka/pull/4495","id":293157947,"number":4495,"title":"KAFKA-6487: ChangeLoggingKeyValueBytesStore does not propagate delete","user":{"login":"bartdevylder","id":1268215,"avatar_url":"https://avatars1.githubusercontent.com/u/1268215?v=4","gravatar_id":"","url":"https://api.github.com/users/bartdevylder","html_url":"https://github.com/bartdevylder","followers_url":"https://api.github.com/users/bartdevylder/followers","following_url":"https://api.github.com/users/bartdevylder/following{/other_user}","gists_url":"https://api.github.com/users/bartdevylder/gists{/gist_id}","starred_url":"https://api.github.com/users/bartdevylder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartdevylder/subscriptions","organizations_url":"https://api.github.com/users/bartdevylder/orgs","repos_url":"https://api.github.com/users/bartdevylder/repos","events_url":"https://api.github.com/users/bartdevylder/events{/privacy}","received_events_url":"https://api.github.com/users/bartdevylder/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2018-01-31T13:29:19Z","updated_at":"2018-02-02T00:16:07Z","closed_at":"2018-02-02T00:14:23Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/apache/kafka/pulls/4495","html_url":"https://github.com/apache/kafka/pull/4495","diff_url":"https://github.com/apache/kafka/pull/4495.diff","patch_url":"https://github.com/apache/kafka/pull/4495.patch"},"body":"The `ChangeLoggingKeyValueBytesStore` used to write null to its underlying store instead of propagating the delete, which has two drawbacks:\r\n- an iterator will see null values\r\n- unbounded memory growth of the underlying in-memory keyvalue store\r\n\r\nThe fix will just propagate the delete instead of performing put(key, null). \r\n\r\nThe changes to the tests:\r\n- extra test whether the key is really gone after delete by calling the `approximateEntries` on the underlying store. This number is exact because we know the underlying store in the test is of type `InMemoryKeyValueStore`\r\n- extra test to check a delete is logged as <key, null>  (the existing test would also succeed if the key is just absent)\r\n\r\nWhile also updating the corresponding tests of the `ChangeLoggingKeyValueStore` I noticed the class is nowhere used anymore so I removed it from the source code for clarity.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/apache/kafka/issues/comments/362445145","html_url":"https://github.com/apache/kafka/pull/4495#issuecomment-362445145","issue_url":"https://api.github.com/repos/apache/kafka/issues/4495","id":362445145,"user":{"login":"guozhangwang","id":10729597,"avatar_url":"https://avatars0.githubusercontent.com/u/10729597?v=4","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},"created_at":"2018-02-02T00:16:07Z","updated_at":"2018-02-02T00:16:07Z","author_association":"CONTRIBUTOR","body":"Cherry-picked to 1.1 as well"}}
{"actor":{"display_login":"guozhangwang"}}