Skip to content

[multistage] hybrid routing support#9379

Merged
walterddr merged 8 commits intoapache:masterfrom
walterddr:pr_add_hybrid_routing
Sep 11, 2022
Merged

[multistage] hybrid routing support#9379
walterddr merged 8 commits intoapache:masterfrom
walterddr:pr_add_hybrid_routing

Conversation

@walterddr
Copy link
Contributor

@walterddr walterddr commented Sep 11, 2022

Overview

This PR is preliminary support for hybrid routing on multistage engine. It copies so of the logics in the broker request side but not all. and only has basic testing.

Details

  • copied some time boundary logics (manager and associated logics) into either core module or replicated in multi-stage planner
  • created a hybrid routing dispatchable stagemetadata
    • indexed each segment with table types
    • added time boundary info if dispatching multiple table types, otherwise ignore
    • reconstructed server requests multiple times.

TODOs

this duplicates lots of logics out of BaseBrokerRequestHandler and also it doesn't do pruning well, so follow up

  • consolidate the logic and abstract them out as util from BaseBrokerRequestHandler
  • create smarter pruning logic on multi-stage server/leaf request compiler.

@codecov-commenter
Copy link

codecov-commenter commented Sep 11, 2022

Codecov Report

Merging #9379 (c6cbaca) into master (65e97d2) will decrease coverage by 0.03%.
The diff coverage is 86.15%.

@@             Coverage Diff              @@
##             master    #9379      +/-   ##
============================================
- Coverage     69.76%   69.72%   -0.04%     
- Complexity     4787     5094     +307     
============================================
  Files          1885     1885              
  Lines        100293   100377      +84     
  Branches      15256    15275      +19     
============================================
+ Hits          69966    69992      +26     
- Misses        25381    25428      +47     
- Partials       4946     4957      +11     
Flag Coverage Δ
integration1 26.09% <0.00%> (+<0.01%) ⬆️
integration2 24.70% <0.00%> (-0.14%) ⬇️
unittests1 66.96% <86.15%> (+<0.01%) ⬆️
unittests2 15.36% <86.15%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...e/pinot/broker/api/resources/PinotBrokerDebug.java 85.71% <ø> (ø)
...roker/requesthandler/BaseBrokerRequestHandler.java 70.24% <ø> (ø)
...che/pinot/broker/routing/BrokerRoutingManager.java 85.87% <ø> (ø)
...oker/routing/timeboundary/TimeBoundaryManager.java 91.35% <ø> (ø)
...rg/apache/pinot/core/routing/TimeBoundaryInfo.java 100.00% <ø> (ø)
.../query/runtime/plan/serde/QueryPlanSerDeUtils.java 90.16% <72.72%> (-9.84%) ⬇️
.../pinot/query/runtime/utils/ServerRequestUtils.java 79.31% <82.05%> (-1.05%) ⬇️
...va/org/apache/pinot/query/runtime/QueryRunner.java 86.48% <87.50%> (-1.02%) ⬇️
.../org/apache/pinot/query/routing/WorkerManager.java 90.74% <96.96%> (+4.07%) ⬆️
.../org/apache/pinot/query/planner/StageMetadata.java 100.00% <100.00%> (ø)
... and 28 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

repeated string instances = 1;
repeated string dataSources = 2;
map<string, SegmentList> instanceToSegmentList = 3;
map<string, SegmentMap> instanceToSegmentMap = 3;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can add another map<string,SegmentList> right? one for real time and one for offline.. thought your approah is more flexible if we add more tabletype

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes this way it is more flexible

@walterddr walterddr merged commit ff0a353 into apache:master Sep 11, 2022
@Jackie-Jiang Jackie-Jiang added the multi-stage Related to the multi-stage query engine label Sep 13, 2022
@walterddr walterddr deleted the pr_add_hybrid_routing branch December 6, 2023 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

multi-stage Related to the multi-stage query engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants