-
Notifications
You must be signed in to change notification settings - Fork 411
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
Exchange receiver decode optimization to do squashing work at the same time #6202
Exchange receiver decode optimization to do squashing work at the same time #6202
Conversation
Signed-off-by: yibin <[email protected]>
Signed-off-by: yibin <[email protected]>
Signed-off-by: yibin <[email protected]>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Signed-off-by: yibin <[email protected]>
Signed-off-by: yibin <[email protected]>
Fine-grained partitioning will exacerbate the chunk fragmentation in exchange and would benefit from this pr much more from normal cases. |
Yeah, and for large-scale clusters, it would benefit also. |
codec.readColumnMeta(i, istr, column); | ||
|
||
/// Data | ||
MutableColumnPtr read_column = column.type->createColumn(); |
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.
Looks like read_column
is not used?
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.
Ah, removed it now.
|
||
#include <Flash/Coprocessor/StreamingDAGResponseWriter.cpp> | ||
#include <Flash/Mpp/BroadcastOrPassThroughWriter.cpp> | ||
#include <Flash/Mpp/ExchangeReceiver.cpp> |
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.
format the include
s
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.
Done
Signed-off-by: yibin <[email protected]>
/run-unit-tests |
Signed-off-by: yibin <[email protected]>
Signed-off-by: yibin <[email protected]>
/run-unit-tests |
/run-integration-test |
/// Data | ||
MutableColumnPtr read_column = column.type->createColumn(); | ||
if (reserve_size > 0) | ||
read_column->reserve(reserve_size); |
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.
reserve rows
if reserve_size <= 0
and if reserve_size >0
, reserve std::max(rows, reserve_size)
?
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.
Make sense, Done.
Signed-off-by: yibin <[email protected]>
Signed-off-by: yibin <[email protected]>
Signed-off-by: yibin <[email protected]>
Signed-off-by: yibin <[email protected]>
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.
others LGTM
Signed-off-by: yibin <[email protected]>
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
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
/merge |
@yibin87: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: e8594cf
|
/type ehencement |
@JasonWu0506: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
/type enhencement |
@JasonWu0506: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
What problem does this PR solve?
Issue Number: close #6157
Problem Summary:
What is changed and how it works?
Previously, TiFlash adds a Squash transform after ExchangeReceiver, because the block output by ExchangeReceiver might be too small and not efficient to handle. However, the two-stage solution would introduce too many memory operations, like column allocations and de-allocations. So in this PR, the one-stage solution is provided.
For a simple local test, with 10 integer columns, 1024 rows per block, performance improves from: 140ms => 60ms.
Check List
Tests
Side effects
Documentation
Release note