You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "KKcorps (via GitHub)" <gi...@apache.org> on 2026/06/01 13:37:14 UTC
[PR] Add WorkerManager extension points for customizing leaf-stage segment assignment [pinot]
KKcorps opened a new pull request, #18645:
URL: https://github.com/apache/pinot/pull/18645
## Description
Subclasses of `WorkerManager` can already customize multi-stage leaf-stage worker selection by overriding
`getCandidateServers` / `getCandidateServersForReplicatedLeaf`, but the per-worker **segment** assignment is finalized
internally with no extension point to adjust it.
This PR adds two `protected` no-op extension points, invoked once the leaf-stage segment assignment has been built:
- `filterLeafStageSegments(DispatchablePlanContext, DispatchablePlanMetadata)` — invoked from
`updateContextForLeafStage`, which the non-partitioned, partitioned, and logical-table leaf paths all funnel through.
- `filterReplicatedLeafStageSegments(DispatchablePlanContext, DispatchablePlanMetadata)` — invoked from
`setSegmentsForReplicatedLeafFragment` for the replicated (broadcast) leaf path.
A subclass can rewrite `DispatchablePlanMetadata#getWorkerIdToSegmentsMap()` / `#getReplicatedSegments()` through the
existing setters — for example to apply a custom segment-pruning policy — with access to the query options via
`DispatchablePlanContext#getPlannerContext().getOptions()`.
## Backward compatibility
Purely additive. Both hooks default to no-ops, so behavior is unchanged for the base `WorkerManager` and all existing
subclasses.
## Testing
Existing multi-stage planning / `WorkerManager` tests continue to pass; the hooks are no-ops by default.
## Release notes
No behavior change — new `protected` extension points only.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Add WorkerManager extension points for customizing leaf-stage segment assignment [pinot]
Posted by "KKcorps (via GitHub)" <gi...@apache.org>.
KKcorps merged PR #18645:
URL: https://github.com/apache/pinot/pull/18645
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Add WorkerManager extension points for customizing leaf-stage segment assignment [pinot]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #18645:
URL: https://github.com/apache/pinot/pull/18645#issuecomment-4593711014
## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/18645?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 56.79%. Comparing base ([`6ed151a`](https://app.codecov.io/gh/apache/pinot/commit/6ed151a4c858269bb634ec0ad3a8f5e8d141632f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`24d4d54`](https://app.codecov.io/gh/apache/pinot/commit/24d4d5472874fae4604851f0a24d0307a9dda418?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
> :exclamation: There is a different number of reports uploaded between BASE (6ed151a) and HEAD (24d4d54). Click for more details.
>
> <details><summary>HEAD has 16 uploads less than BASE</summary>
>
>| Flag | BASE (6ed151a) | HEAD (24d4d54) |
>|------|------|------|
>|java-21|5|1|
>|unittests|2|1|
>|temurin|5|1|
>|unittests2|1|0|
>|integration|3|0|
>|integration1|1|0|
>|integration2|1|0|
>|custom-integration1|1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #18645 +/- ##
============================================
- Coverage 64.39% 56.79% -7.60%
+ Complexity 1282 1 -1281
============================================
Files 3362 2576 -786
Lines 207915 149555 -58360
Branches 32463 24166 -8297
============================================
- Hits 133883 84945 -48938
+ Misses 63258 57420 -5838
+ Partials 10774 7190 -3584
```
| [Flag](https://app.codecov.io/gh/apache/pinot/pull/18645/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [custom-integration1](https://app.codecov.io/gh/apache/pinot/pull/18645/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration](https://app.codecov.io/gh/apache/pinot/pull/18645/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration1](https://app.codecov.io/gh/apache/pinot/pull/18645/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration2](https://app.codecov.io/gh/apache/pinot/pull/18645/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [java-21](https://app.codecov.io/gh/apache/pinot/pull/18645/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.79% <100.00%> (-7.60%)` | :arrow_down: |
| [temurin](https://app.codecov.io/gh/apache/pinot/pull/18645/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.79% <100.00%> (-7.60%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/pinot/pull/18645/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.79% <100.00%> (-7.60%)` | :arrow_down: |
| [unittests1](https://app.codecov.io/gh/apache/pinot/pull/18645/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.79% <100.00%> (+<0.01%)` | :arrow_up: |
| [unittests2](https://app.codecov.io/gh/apache/pinot/pull/18645/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/pinot/pull/18645?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Add WorkerManager extension points for customizing leaf-stage segment assignment [pinot]
Posted by "xiangfu0 (via GitHub)" <gi...@apache.org>.
xiangfu0 commented on PR #18645:
URL: https://github.com/apache/pinot/pull/18645#issuecomment-4604377511
Opened the docs follow-up PR for this change: pinot-contrib/pinot-docs#848
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org