[multistage] Fix Bug in MailboxInfo Ordering#16224
Merged
itschrispeck merged 1 commit intoapache:masterfrom Jun 30, 2025
Merged
[multistage] Fix Bug in MailboxInfo Ordering#16224itschrispeck merged 1 commit intoapache:masterfrom
itschrispeck merged 1 commit intoapache:masterfrom
Conversation
Contributor
|
should be issue #16223 ? |
Contributor
Author
ah thank you. my bad. fixed it |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #16224 +/- ##
============================================
+ Coverage 62.90% 63.19% +0.29%
+ Complexity 1386 1365 -21
============================================
Files 2867 2959 +92
Lines 163354 170578 +7224
Branches 24952 26096 +1144
============================================
+ Hits 102755 107803 +5048
- Misses 52847 54613 +1766
- Partials 7752 8162 +410
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
itschrispeck
approved these changes
Jun 30, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #16223
I had made an assumption that the Runtime would sort the
List<SendingMailbox>used for modulo arithmetic inHashExchange, so I was creatingList<MailboxInfo>without regard to ordering.But that isn't the case, as can be seen here:
pinot/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/MailboxSendOperator.java
Lines 164 to 173 in 7122e24
While this PR should fix the flaky test and also the bug with v2 optimizer, I want to revisit this when I am implementing parallelism.
Test Plan: I built a custom test to reproduce the error with very high probability, but I can't really check that code in. So skipping UTs. But this patch has been manually verified with that custom test and the test had passed on 10 consecutive runs.
Custom Patch Details
To reproduce, I took one of the failing queries from the flaky test. The symptom was that we were getting 0 records but expectation was non-zero records. I found that after the join operator we had zero records, which meant that records were not assigned correctly to the streams. Digging deeper, I found that the issue was easy to reproduce if the two workers on left and right were assigned in reverse order of each other.