Skip to content
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

MPPTask's earier exit may cause false positive error #7177

Closed
windtalker opened this issue Mar 29, 2023 · 1 comment
Closed

MPPTask's earier exit may cause false positive error #7177

windtalker opened this issue Mar 29, 2023 · 1 comment

Comments

@windtalker
Copy link
Contributor

windtalker commented Mar 29, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Consider the case that
{MPPTask1, MPPTask2} =======> {MPPTask3,MPPTask4}

Assuming that MPPTask3/MPPTask4 contains executor that may cause earier exit(for example, limit and filter with always false filter condition), then MPPTask3/MPPTask4 may exit earier before consumming all the data produced by MPPTask1/MPPTask2, and once MPPTask3/MPPTask4 finish executing, it will close the exchange reciever, so if MPPTask1/MPPTask2 is sending data to MPPTask3/MPPTask4 again, it will meet closed tunnel error, if this error happens before TiDB get all the result from the query, then there is a chance that the error message will be sent to TiDB, and TiDB think the query fails, which is actually a false positive error.

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your TiFlash version? (Required)

@yibin87
Copy link
Contributor

yibin87 commented Aug 18, 2023

Add a specific SQL and explain case here:
select asceding.item_sk from (select * from (select ss_item_sk item_sk,avg(ss_net_profit) rank_col from store_sales ss1 where ss_store_sk = 47 group by ss_item_sk having avg(ss_net_profit) > null)V1) asceding, (select * from (select ss_item_sk item_sk,avg(ss_net_profit) rank_col from store_sales ss1 group by ss_item_sk)V2) descending where asceding.item_sk = descending.item_sk;
The query plan:
yC22WAZlg1

The Selection_24 operator's filter is gt(Column#24, NULL), which is alwarys false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment