You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running a query like select a from annotated_data_infinite2 order by b desc limit 10, a SortPreservingMergeStream is created that merge sorts the presorted partitions. During the initial sorting phase of the query, the query execution will continuously hit
where the stream wakes the current task for rescheduling. Since all the input streams will be pending for quite some time during the sort of a large data the execution ends up in a busy-waiting loop.
I believe this was introduced in f2a8b07. It's not clear to me why the self wake was added.
A closer look shows I might be completely mistaken. Will close if irrelevant. Nope, not a case of PEBKAC after all. I've refined the reproduction scenario.
Activity
pepijnve commentedon Jun 7, 2025
Investigating, but help appreciated.
pepijnve commentedon Jun 7, 2025
A closer look shows I might be completely mistaken. Will close if irrelevant.Nope, not a case of PEBKAC after all. I've refined the reproduction scenario.bug: remove busy-wait while sort is ongoing (apache#16321)
bug: remove busy-wait while sort is ongoing (apache#16321)
bug: remove busy-wait while sort is ongoing (apache#16321)
bug: remove busy-wait while sort is ongoing (apache#16321)
bug: remove busy-wait while sort is ongoing (apache#16321)
pepijnve commentedon Jun 8, 2025
Just to have a hyperlink between the issues: as far as I can tell the behavior was introduced by #12302 to resolve #12300.
bug: remove busy-wait while sort is ongoing (apache#16321)
bug: remove busy-wait while sort is ongoing (#16322)