Skip to content

Fix propagation of noMoreSplits flag to running tasks#14794

Merged
arhimondr merged 2 commits intotrinodb:masterfrom
losipiuk:lo/fix-no-more-splits
Oct 27, 2022
Merged

Fix propagation of noMoreSplits flag to running tasks#14794
arhimondr merged 2 commits intotrinodb:masterfrom
losipiuk:lo/fix-no-more-splits

Conversation

@losipiuk
Copy link
Copy Markdown
Member

@losipiuk losipiuk commented Oct 27, 2022

Without the fix, the update with noMoreSplits=true was not called
on an open partition in the case when source fragments did not generate any splits.
As a result of that, if tasks consuming this partition were scheduled
before the partition was sealed they never learned that there will not be any more
splits for the partition, and never finished. As a result, the query hung.

The common case was that query was completed successfully as usually tasks
only started after the partition was already sealed which implied
noMoreSplits=true, even if not set explicitly.

Release notes

( ) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
(x) Release notes are required, with the following suggested text:

# Engine
* Fix a rare condition when some queries where one of the stages did not produce any data could hang indefinitely when running in fault-tolerant mode (with `retry-mode` set to `TASK`). ({issue}`14794`)

Without the fix, the update with noMoreSplits=true was not called
on an open partition in the case when source fragments did not generate any splits.
As a result of that, if tasks consuming this partition were scheduled
before the partition was sealed they never learned that there will not be any more
splits for the partition, and never finished. As a result, the query hung.

The common case was that query was completed successfully as usually tasks
only started after the partition was already sealed which implied
noMoreSplits=true, even if not set explicitly.
@cla-bot cla-bot bot added the cla-signed label Oct 27, 2022
@losipiuk losipiuk requested a review from arhimondr October 27, 2022 09:56
@arhimondr arhimondr merged commit cdb85d0 into trinodb:master Oct 27, 2022
@github-actions github-actions bot added this to the 402 milestone Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants