ExchangeSenderOp check writer status only if there is data to flush to MPPTunnel#9736
Conversation
|
/test pull-unit-test |
|
/test pull-integration-test |
| OperatorStatus ExchangeSenderSinkOp::tryFlush() | ||
| { | ||
| assert(buffer); | ||
| auto res = waitForWriter(); |
There was a problem hiding this comment.
Perhaps moving waitForWriter into Writer::write and Writer::flush would be better. This way, even if the tunnel is busy, write can still batch in memory.
There was a problem hiding this comment.
You mean if the block's size is small, it will be cached in the writer without writting to tunnel?
There was a problem hiding this comment.
yes, if the total block rows is smaller than batch_send_min_limit, MPPTunnel::write would not be call.
https://github.com/pingcap/tiflash/blob/master/dbms/src/Flash/Mpp/BroadcastOrPassThroughWriter.cpp#L103-L109
There was a problem hiding this comment.
Good idea, I reimplement this pr by moving waitForWriter to Writer::flush. But waitForWriter is still needed in ExchangeSenderSinkOp::await
43283c9 to
f2b866d
Compare
| if (need_flush) | ||
| { | ||
| // the writer must has data to flush | ||
| assert(writer->hasDataToFlush()); |
There was a problem hiding this comment.
How about using RUNTIME_CHECK?
aa254a7 to
3be2940
Compare
|
/hold |
SeaRise
left a comment
There was a problem hiding this comment.
lgtm
comment /unhold to merge pr.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gengliqi, SeaRise, yibin87 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
3d63e2c to
5495435
Compare
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
5495435 to
ebe5a73
Compare
|
/unhold |
|
/hold |
|
/unhold |
…o MPPTunnel (pingcap#9736) ref pingcap#6233 Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
|
@windtalker: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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 kubernetes-sigs/prow repository. I understand the commands that are listed here. |
…o MPPTunnel (pingcap#9736) ref pingcap#6233 Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
…o MPPTunnel (pingcap#9736) ref pingcap#6233 Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
close #10058 Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
What problem does this PR solve?
Issue Number: ref #6233
Problem Summary:
Currently,
ExchangeSenderSinkOpcheck the writer status inExchangeSenderSinkOp::prepareImpl(), so even if there is currently no data to write, theExchangeSenderSinkOpneed to check the writer status, and the pipeline task maybe blocked if the writer is not ready. In this pr,ExchangeSenderSinkOponly check the writer status if it has data to flush to MPPTunnel.What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note