-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[multistage] fix usage of metadata overrides #11587
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] fix usage of metadata overrides #11587
Conversation
Jackie-Jiang
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.
Mostly good
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/plan/StageMetadata.java
Outdated
Show resolved
Hide resolved
...query-runtime/src/main/java/org/apache/pinot/query/runtime/plan/OpChainExecutionContext.java
Outdated
Show resolved
Hide resolved
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/QueryRunner.java
Show resolved
Hide resolved
...t-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/AggregateOperator.java
Outdated
Show resolved
Hide resolved
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/HashJoinOperator.java
Show resolved
Hide resolved
| // first put all custom Properties | ||
| requestMetadata.putAll(customProperties); | ||
| // put all overrides from request | ||
| requestMetadata.putAll(requestMetadataOriginal); |
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.
I think we should put request level metadata first, then override the stage level custom property
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.
this changes the previous behavior. i will separate that into a different PR outside of this bugfix
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/QueryRunner.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #11587 +/- ##
============================================
- Coverage 63.04% 63.03% -0.01%
+ Complexity 1109 1105 -4
============================================
Files 2320 2326 +6
Lines 124667 124884 +217
Branches 19033 19063 +30
============================================
+ Hits 78600 78726 +126
- Misses 40476 40549 +73
- Partials 5591 5609 +18
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 88 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
custom properties in StageMetadata and
requestMetadata from WorkerRequest are immutable
mutating it during execution causes race-condition in set b/c multiple worker shares the same metadata
thus