Skip to content

Parallel disptach read fragment instance #15639

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

Merged
merged 13 commits into from
Jun 24, 2025
Merged

Parallel disptach read fragment instance #15639

merged 13 commits into from
Jun 24, 2025

Conversation

shuwenwei
Copy link
Collaborator

Description

Parallel disptach read fragment instance

Copy link

codecov bot commented Jun 4, 2025

Codecov Report

Attention: Patch coverage is 15.90909% with 74 lines in your changes missing coverage. Please review.

Project coverage is 39.12%. Comparing base (f55dfe0) to head (44150d3).
Report is 23 commits behind head on master.

Files with missing lines Patch % Lines
...plan/scheduler/FragmentInstanceDispatcherImpl.java 0.00% 60 Missing ⚠️
...eryengine/plan/planner/TableOperatorGenerator.java 0.00% 7 Missing ⚠️
...b/queryengine/plan/scheduler/ClusterScheduler.java 0.00% 4 Missing ⚠️
.../apache/iotdb/db/queryengine/plan/Coordinator.java 80.00% 1 Missing ⚠️
...db/queryengine/plan/planner/plan/PlanFragment.java 75.00% 1 Missing ⚠️
...ngine/plan/scheduler/load/LoadTsFileScheduler.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #15639      +/-   ##
============================================
- Coverage     39.14%   39.12%   -0.03%     
  Complexity      198      198              
============================================
  Files          4835     4837       +2     
  Lines        314405   314565     +160     
  Branches      39436    39458      +22     
============================================
- Hits         123067   123059       -8     
- Misses       191338   191506     +168     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -84,6 +84,8 @@ public class FragmentInstanceManager {
private final ExecutorService intoOperationExecutor;
private final ExecutorService modelInferenceExecutor;

private final ExecutorService dispatchExecutor;
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't put it here, better put in it in Coordinator. FragmentInstanceManager takes effect actually in backend, however parallel dispatch happends in front end.

Comment on lines 218 to 220
// TODO: (xingtanzjr) currently we use a sequential dispatch policy for READ, which is
// unsafe for current FragmentInstance scheduler framework. We need to implement the
// topological dispatch according to dependency relations between FragmentInstances
Copy link
Contributor

Choose a reason for hiding this comment

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

you can delete this todo

Comment on lines 203 to 205
// it
// will
// release lots of memory
Copy link
Contributor

Choose a reason for hiding this comment

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

why not put it in one line

TSStatusCode.INTERNAL_SERVER_ERROR, UNEXPECTED_ERRORS + t.getMessage()));
} finally {
for (SubPlan child : plan.getChildren()) {
queue.add(new Pair<>(child, success));
Copy link
Contributor

Choose a reason for hiding this comment

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

if not successful, there is no need to continue putting children into queue?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

When a failure occurs, at least one needs to be sent to notify the outer loop to exit

}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
LOGGER.error("Interrupted when dispatching read async", e);
Copy link
Contributor

Choose a reason for hiding this comment

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

warn is ok

Copy link

@JackieTien97 JackieTien97 merged commit 5cb3881 into master Jun 24, 2025
58 of 60 checks passed
@JackieTien97 JackieTien97 deleted the parallelDispatch branch June 24, 2025 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants