[
https://issues.apache.org/jira/browse/KAFKA-5932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16183203#comment-16183203
]
ASF GitHub Bot commented on KAFKA-5932:
---------------------------------------
GitHub user bbejeck opened a pull request:
https://github.com/apache/kafka/pull/3978
KAFKA-5932: Avoid call to fetchPrevious in FlushListeners
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/bbejeck/kafka
KAFKA-5932_no_fetch_previous_when_no_old_values_returned
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/3978.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 #3978
----
commit 1fa488d55af6cf9ca3898274e15a3dbe703eaea7
Author: Bill Bejeck <[email protected]>
Date: 2017-09-27T20:26:12Z
KAFKA-5932: Avoid call to fetchPrevious in FlushListeners
----
> Avoid call fetchPrevious in FlushListeners
> ------------------------------------------
>
> Key: KAFKA-5932
> URL: https://issues.apache.org/jira/browse/KAFKA-5932
> Project: Kafka
> Issue Type: Improvement
> Components: streams
> Reporter: Guozhang Wang
> Assignee: Bill Bejeck
>
> When caching is turned on for a window or session store, upon {{store.put()}}
> the cache may gets flushed, trigger the dirty flush listener calling
> {{maybeForward()}}, which calls {{fetchPrevious()}}.
> Unfortunately {{fetchPrevious()}} could be a very expensive call to make, and
> sometimes are not necessary:
> 1. When {{KStreamWindowAggregate.process()}} already gets the previous value
> when aggregating, so we could passing the old value through the tuple
> forwarder without calling fetchPrevious again.
> 2. When we know that {{sendOldValues}} flag is turned off.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)