-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix the SortBuffer's noMoreInput called twice when enable smj #10614
Conversation
✅ Deploy Preview for meta-velox canceled.
|
@pedroerp Can you help to review? Thanks for your help. |
@JkSelf thanks for looking into this. While this seems like a simple fix, I wonder in this case if the caller is doing something wrong? Did you check which code is actually calling this function twice (which it shouldn't)? |
I think the check is right, we should not sort the data twice and release the pool twice https://github.com/facebookincubator/velox/pull/10614/files#diff-f80347d211a617e028feceac2e8d028932b9232c73fe841b8c2f4eb3cc61a870L130. Why is it invoked twice, can we avoid invoking twice? |
d8e1295
to
50c8cc7
Compare
Thanks for your investigate. Looks good. Can you add a unit test? |
@pedroerp @jinchengchenghh |
@pedroerp Can you help to look this PR? Passed in my local test. |
Thanks @JkSelf for digging into this! Could you add a unit test that reproduces this error? I'm concerned that if we need to refactor this code in the future we may break this again unless we have a unit test to protect the behavior. |
@pedroerp Yes. Added the failed unit test. Can you help to review again? Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now, thanks @JkSelf
@xiaoxmeng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@xiaoxmeng merged this pull request in 37aac8a. |
Conbench analyzed the 1 benchmark run on commit There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
We encountered an exception while executing Q22 on a 1TB TPC-H dataset using sort merge join. The issue arises because the SortBuffer#noMoreInput() method is invoked multiple times. By eliminating this redundant check, Q22 executes successfully.