-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-16257][network] Remove useless ResultPartitionID from AddCredit message #11219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…t message The ResultPartitionID in AddCredit message is never used on upstream side, so we can remove it to cleanup the codes. There would have another two benefits to do so: 1. Reduce the total message size from previous 52 bytes to 20 bytes. 2. Decouple the dependency with InputChannel#getPartitionId.
The method SingleInputGate#getConsumedResultId is never used, so remove it to cleanup the codes.
|
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit 75bddc5 (Wed Feb 26 05:51:09 UTC 2020) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. DetailsThe Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
|
|
||
| partitionId.getPartitionId().writeTo(result); | ||
| partitionId.getProducerId().writeTo(result); | ||
| result = allocateBuffer(allocator, ID, 4 + 16); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: replace numbers with constants Integer.BYTES and Long.BYTES?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it seems more readable for this change, but not quite relevant with this PR purpose.
After double checking the codes, there are many other places to take the current way in this class. So I might consider this change as a separate issue for unification future.
rkhachatryan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except for one optional thing (see above)
|
Thanks for the review @rkhachatryan , I replied the inline comments above. |
What is the purpose of the change
The
ResultPartitionIDin AddCredit message is never used on upstream side, so we can remove it to cleanup the codes. There would have another two benefits to do so:InputChannel#getPartitionId.Brief change log
ResultPartitionIDfromAddCreditmessageVerifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (yes / no)Documentation