[ https://issues.apache.org/jira/browse/KAFKA-3941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15371812#comment-15371812 ]
ASF GitHub Bot commented on KAFKA-3941: --------------------------------------- GitHub user guozhangwang opened a pull request: https://github.com/apache/kafka/pull/1610 KAFKA-3941: Delay eviction listener in InMemoryKeyValueLoggedStore after restoration Also move the initialization that restores from changelog to inner stores. You can merge this pull request into a Git repository by running: $ git pull https://github.com/guozhangwang/kafka K3941-avoid-eviction-listener Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/1610.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1610 ---- commit bcf1c8070ded1b65b27e4a71673ecf2a54b5affc Author: Guozhang Wang <wangg...@gmail.com> Date: 2016-07-11T20:48:35Z Add the listener in InMemoryLRUCache after restoration commit 02954a2e91aa7e1982d486551d54daa5107fc5b5 Author: Guozhang Wang <wangg...@gmail.com> Date: 2016-07-11T21:05:02Z Merge branch 'trunk' of https://git-wip-us.apache.org/repos/asf/kafka into K3941-avoid-eviction-listener commit f9f5d518969b0f5e80aa4aeab9e2c17feec62c5b Author: Guozhang Wang <wangg...@gmail.com> Date: 2016-07-11T22:26:55Z revert storeSupplier.get() changes commit f230b38e15d7464a6fd88aca43aacc225a583292 Author: Guozhang Wang <wangg...@gmail.com> Date: 2016-07-11T22:32:04Z revert gradlew changes ---- > Avoid applying eviction listener in InMemoryKeyValueLoggedStore > --------------------------------------------------------------- > > Key: KAFKA-3941 > URL: https://issues.apache.org/jira/browse/KAFKA-3941 > Project: Kafka > Issue Type: Bug > Components: streams > Reporter: Guozhang Wang > Assignee: Guozhang Wang > > This is reported by [~norwood]. > In {{InMemoryKeyValueLoggedStore}} we set the eviction listener which records > the evicted records as deletes in the changelog. However, when restoring the > store this listener will then double-writes the delete record, causing the > restoration process to fail. > We should defer the listener initialization until the end of the {{init}} > call, instead of inside the {{supplier.get}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)