-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[multistage] Add Support for Inferring Invalid Segment Partition Id #15760
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
Conversation
134749c to
d5280dc
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #15760 +/- ##
============================================
+ Coverage 62.90% 63.25% +0.35%
- Complexity 1386 1388 +2
============================================
Files 2867 2888 +21
Lines 163354 165241 +1887
Branches 24952 25259 +307
============================================
+ Hits 102755 104524 +1769
+ Misses 52847 52826 -21
- Partials 7752 7891 +139
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:
|
...java/org/apache/pinot/query/planner/physical/v2/opt/rules/LeafStageWorkerAssignmentRule.java
Outdated
Show resolved
Hide resolved
pinot-common/src/main/java/org/apache/pinot/common/utils/config/QueryOptionsUtils.java
Outdated
Show resolved
Hide resolved
...-planner/src/main/java/org/apache/pinot/query/planner/physical/v2/PRelNodeTreeValidator.java
Show resolved
Hide resolved
...java/org/apache/pinot/query/planner/physical/v2/opt/rules/LeafStageWorkerAssignmentRule.java
Show resolved
Hide resolved
...java/org/apache/pinot/query/planner/physical/v2/opt/rules/LeafStageWorkerAssignmentRule.java
Outdated
Show resolved
Hide resolved
...java/org/apache/pinot/query/planner/physical/v2/opt/rules/LeafStageWorkerAssignmentRule.java
Outdated
Show resolved
Hide resolved
...-planner/src/main/java/org/apache/pinot/query/planner/physical/v2/PRelNodeTreeValidator.java
Outdated
Show resolved
Hide resolved
|
lgtm |
MeihanLi
left a comment
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.
LGTM!
Summary
For Realtime streams, there can be scenarios where a very small percentage of records will be incorrectly assigned to a Stream Partition (when partitioning by a key is enabled).
In such a case, the Physical Optimizer will assume the Table Scan to be un-partitioned.
This is an overkill for some use-cases, where minute errors (e.g. <0.0001%) are acceptable.
This PR adds a query option to enable this feature. The behavior is that we will infer the partition of the segment based on its name. This only works with Realtime segments since for offline segments batch ingestion should be easily able to guarantee that the partitioning is done correctly. (we also don't have a standard way to infer a partition in that case)
I have also added some metrics which were missing with the Physical Optimizer (join count, window count, etc.). These were emitted in
RelToPlanNodeConverter. I now instead do it in a centralized place so we can also emit more metrics in the future.Testing
Added UTs for Leaf Stage worker assignment. We are also testing this out in one of our bigger clusters.