KAFKA-6036: Follow-up; cleanup sendOldValues logic ForwardingCacheFlushListener #6017
Merged
guozhangwang merged 2 commits intoapache:trunkfrom Dec 9, 2018
Merged
Conversation
Contributor
Author
mjsax
approved these changes
Dec 9, 2018
Member
mjsax
left a comment
There was a problem hiding this comment.
LGTM (assuming Jenkins passes).
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
sendOldValuesat the callers in order to avoid unnecessary store reads.More details:
ForwardingCacheFlushListenerandTupleForwarderboth need sendOldValues as parameters.a. For
ForwardingCacheFlushListenerit is not needed at all, since its callersXXXCachedStorealready use the sendOldValues values passed fromTupleForwarderto 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.
Committer Checklist (excluded from commit message)