Skip to content

KAFKA-6036: Follow-up; cleanup sendOldValues logic ForwardingCacheFlushListener #6017

Merged
guozhangwang merged 2 commits intoapache:trunkfrom
guozhangwang:K6036-refactor-send-old-values
Dec 9, 2018
Merged

KAFKA-6036: Follow-up; cleanup sendOldValues logic ForwardingCacheFlushListener #6017
guozhangwang merged 2 commits intoapache:trunkfrom
guozhangwang:K6036-refactor-send-old-values

Conversation

@guozhangwang
Copy link
Copy Markdown
Contributor

@guozhangwang guozhangwang commented Dec 9, 2018

This is a follow-up PR from the previous PR #5779, where KTabeSource always get old values from the store even if sendOldValues. It gets me to make a pass over all the KTable/KStreamXXX processor to push the sendOldValues at the callers in order to avoid unnecessary store reads.

  1. More details: ForwardingCacheFlushListener and TupleForwarder both need sendOldValues as parameters.
    a. For ForwardingCacheFlushListener it is not needed at all, since its callers XXXCachedStore already use the sendOldValues values passed from TupleForwarder to avoid getting old values from underlying stores.
    b. For TupleForwarder, it actually only need to pass the boolean flag to the cached store; and then it does not need to keep it as its own variable since the cached store already respects the boolean to pass null or the actual value..

  2. The only other minor bug I found from the pass in on KTableJoinMerge, where we always pass old values and ignores sendOldValues.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@guozhangwang
Copy link
Copy Markdown
Contributor Author

@mjsax

@mjsax mjsax added the streams label Dec 9, 2018
Copy link
Copy Markdown
Member

@mjsax mjsax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (assuming Jenkins passes).

@guozhangwang guozhangwang merged commit ab156fd into apache:trunk Dec 9, 2018
pengxiaolong pushed a commit to pengxiaolong/kafka that referenced this pull request Jun 14, 2019
…shListener (apache#6017)

This is a follow-up PR from the previous PR apache#5779, where KTabeSource always get old values from the store even if sendOldValues. It gets me to make a pass over all the KTable/KStreamXXX processor to push the sendOldValues at the callers in order to avoid unnecessary store reads.

More details: ForwardingCacheFlushListener and TupleForwarder both need sendOldValues as parameters.
a. For ForwardingCacheFlushListener it is not needed at all, since its callers XXXCachedStore already use the sendOldValues values passed from TupleForwarder to avoid getting old values from underlying stores.
b. For TupleForwarder, it actually only need to pass the boolean flag to the cached store; and then it does not need to keep it as its own variable since the cached store already respects the boolean to pass null or the actual value..

The only other minor bug I found from the pass in on KTableJoinMerge, where we always pass old values and ignores sendOldValues.

Reviewers: Matthias J. Sax <mjsax@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants