-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[multistage] perf regression on ORDER BY queries #10555
Comments
Hmm I see.. this is also related to some other known gaps with how the callbacks are handled. I haven't gotten a chance to work on it lately: #10424 I think I can prioritize it for next week (we are also planning to finalize our prod build internally so this is aligned with that). |
Some logs for the testing done to identify the RC: One example Send <-> Receive interaction:
@ankitsultana let's discuss a potential solution for this. As seen above, we added the blocks to the priority queue fairly quickly, then waited almost 15 seconds to get the EOS. The Sender had sent out the blocks and EOS much earlier. All time calculations are using |
Is there a way to repro this on local easily? |
@ankitsultana I've been using |
Sounds good. Let me take an initial look and get back. We can sync up later this week on the follow-ups. Does that work? |
Yup that works. Let me know if you need any more information |
Never mind the above, returning a no-op of course won't help as it gives the signal to yield which results in the long wait for |
Took a look and I think this is what's happening: Say we are sorting in MailboxReceiveOperator and there's a single receiving mailbox. Say these blocks were sent in order: Either via callback or during first run of the OpChain, we will consume Since we receive a NoOp block, we will try to yield, in where we'll check whether there's any callback for this OpChain (by looking up Say there is a callback, in that case we will schedule the OpChain again and clear the A possible fix for this would be to add a new MailboxReceiveOperator, say There's a separate issue of missed callbacks btw which I have been punting for a while. I'll invest more time on this ticket next week: #10424 Lmk if I missed something. |
Thanks for the analysis, I agree that for the sorting logic we need to keep polling until EOS or null is seen. I’ll take up this fix today. I don’t want to add a SortOperator on top as in the future we want to things like sort on sender and have receiver do k way merge and things like partitioned sort for window functions where we only sort within a partition instead of a full sort. Sort operator also applies an upper limit for limit which needs to be handled very carefully for window functions to avoid correctness issues. Also the sort exchange means that any receiving operators above it can expect sorted data. |
The fix for the ORDER BY regression is merged. |
Yup sounds good. Closing |
Example
see:
https://github.com/apache/pinot/actions/runs/4440707776/jobs/7794852115 vs https://github.com/apache/pinot/actions/runs/4441822565/jobs/7797366601
Research
seems like the issue occurs on #10408
DEFAULT_SCHEDULER_RELEASE_TIMEOUT_MS = 1_000; // 10_000;
for the RoundRobinScheduler it is becoming much faster.Action items
The text was updated successfully, but these errors were encountered: