Skip to content

Query running in pipeline model may hang forever in some cases #10058

@windtalker

Description

@windtalker

Bug Report

Please answer these questions before submitting your issue. Thanks!
Original introduced by #9072, #9424 try to fix the hang by "whenever a task is notified from exchange sender, may sure it will write something to the exchange sender's send queue or notify next task in the sender's send queue", but #9424 assumes that if a task is notified by exchange sender's send queue, it will always call sink->write() at the end of current run, this assuming is wrong in sometimes, for example, for a left join with left side as the build side, the runnig task may be trapped into wait notify state when probe is done and it need to wait for all task's probe finish. If a task is trapped into wait notify state, it will never call sink->write().
#9736 had another fix for #9072, and it does not rely on that assumaption, but #9736 does not cherry pick to release-8.5 branch, so this bug is fixed in master/9.0 but still exsits in release-8.5

1. Minimal reproduce step (Required)

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

3. What did you see instead (Required)

4. What is your TiFlash version? (Required)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions