You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "morrySnow (via GitHub)" <gi...@apache.org> on 2026/05/27 09:04:54 UTC

[PR] [refactor](nereids) add Javadoc to UnassignedJob.computeAssignedJobs and related methods [doris]

morrySnow opened a new pull request, #63743:
URL: https://github.com/apache/doris/pull/63743

   ## Summary
   - Add comprehensive Javadoc to `UnassignedJob.computeAssignedJobs()` and all its overrides across 10 concrete subclasses
   - Document the two-phase parallelization strategy in `AbstractUnassignedScanJob` (`multipleMachinesParallelization` + `insideMachineParallelization`)
   - Add Javadoc to all protected helper methods: `degreeOfParallelism`, `assignLocalShuffleJobs`, `assignedDefaultJobs`, `useLocalShuffleToAddParallel`, `fillUpAssignedJobs`, `fillUpSingleEmptyInstance`
   - Each subclass override explains its specific logic (colocate/bucket join, query cache partition optimization, missing bucket fill-up, etc.)
   
   ## Test plan
   - [ ] Build passes: `./build.sh --fe`
   - [ ] No behavioral change — comments only
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [chore](distribute plan) add Javadoc to UnassignedJob.computeAssignedJobs and related methods [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63743:
URL: https://github.com/apache/doris/pull/63743#issuecomment-4590384529

   # FE Regression Coverage Report
   Increment line coverage `  0.00% (0/286)` :tada:
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/63743_ee639c90de86e2ca64eb37410ab15996b7be8c04_merge_fe/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/63743_ee639c90de86e2ca64eb37410ab15996b7be8c04_merge_fe/report/index.html)
   


-- 
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@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [chore](distribute plan) add Javadoc to UnassignedJob.computeAssignedJobs and related methods [doris]

Posted by "morrySnow (via GitHub)" <gi...@apache.org>.
morrySnow merged PR #63743:
URL: https://github.com/apache/doris/pull/63743


-- 
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@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [chore](distribute plan) add Javadoc to UnassignedJob.computeAssignedJobs and related methods [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #63743:
URL: https://github.com/apache/doris/pull/63743#discussion_r3310304614


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/distribute/worker/job/UnassignedScanMetadataJob.java:
##########
@@ -56,6 +65,16 @@ protected Map<DistributedPlanWorker, UninstancedScanSource> multipleMachinesPara
         );
     }
 
+    /**
+     * If no workers could be selected for the metadata scan (e.g. all backends are
+     * unavailable), create a single empty instance on a random available worker

Review Comment:
   This example is misleading. `fillUpAssignedJobs()` only reaches `fillUpSingleEmptyInstance()` when the selected scan ranges produced no assigned jobs; it does not recover from all BEs being unavailable. The fallback still calls `workerManager.randomAvailableWorker(catalogId)`, which throws a `NereidsException` when no scan backend is available. Please describe this as the empty-scan-range/pruned case instead of an all-backends-unavailable fallback that prevents query failure.



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/distribute/worker/job/UnassignedShuffleJob.java:
##########
@@ -50,6 +50,22 @@ public UnassignedShuffleJob(
         super(statementContext, fragment, ImmutableList.of(), exchangeToChildJob);
     }
 
+    /**
+     * Compute assigned jobs for a shuffle (data redistribution) fragment.
+     * The instance count is determined by the parallelism of the largest child
+     * fragment. When the expected instance count is lower than the child count
+     * (e.g. due to session variable limits or query cache constraints), workers
+     * are shuffled to spread instances across different backends for load balancing.
+     * When more instances are needed, worker assignment follows the child layout.

Review Comment:
   This sentence does not match the implementation. When `expectInstanceNum` is greater than or equal to the largest child fragment size, the `else` branch still calls `buildInstances(biggestParallelChildFragment.size(), ...)`, so this method never creates "more instances" than the child layout. It only preserves the child instance count and worker placement. Please reword this to avoid implying that higher requested exchange parallelism increases the instance count here.



-- 
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@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [chore](distribute plan) add Javadoc to UnassignedJob.computeAssignedJobs and related methods [doris]

Posted by "morrySnow (via GitHub)" <gi...@apache.org>.
morrySnow commented on PR #63743:
URL: https://github.com/apache/doris/pull/63743#issuecomment-4589202381

   run buildall


-- 
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@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [chore](distribute plan) add Javadoc to UnassignedJob.computeAssignedJobs and related methods [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63743:
URL: https://github.com/apache/doris/pull/63743#issuecomment-4590018687

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 31929 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
   Tpch sf100 test result on commit ee639c90de86e2ca64eb37410ab15996b7be8c04, data reload: false
   
   ------ Round 1 ----------------------------------
   orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
   ============================================
   q1	17759	4173	4092	4092
   q2	q3	10785	1424	873	873
   q4	4689	486	346	346
   q5	7590	2332	2191	2191
   q6	255	183	143	143
   q7	954	809	640	640
   q8	9382	1778	1719	1719
   q9	5907	4961	5031	4961
   q10	6444	2249	1874	1874
   q11	454	280	248	248
   q12	635	433	292	292
   q13	18137	3443	2792	2792
   q14	265	260	235	235
   q15	q16	825	774	711	711
   q17	959	879	987	879
   q18	6931	5819	5478	5478
   q19	1201	1172	1212	1172
   q20	553	462	284	284
   q21	5789	2886	2694	2694
   q22	593	370	305	305
   Total cold run time: 100107 ms
   Total hot run time: 31929 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
   ============================================
   q1	4892	4754	4797	4754
   q2	q3	4912	5360	4715	4715
   q4	2137	2203	1412	1412
   q5	5049	4777	4708	4708
   q6	258	181	146	146
   q7	1950	1758	1597	1597
   q8	2494	2191	2221	2191
   q9	8029	7482	7495	7482
   q10	4805	4703	4224	4224
   q11	544	383	354	354
   q12	730	757	529	529
   q13	3102	3416	2780	2780
   q14	281	287	256	256
   q15	q16	672	699	601	601
   q17	1299	1253	1252	1252
   q18	7384	6720	6786	6720
   q19	1139	1106	1088	1088
   q20	2227	2238	1940	1940
   q21	5339	4610	4489	4489
   q22	532	468	412	412
   Total cold run time: 57775 ms
   Total hot run time: 51650 ms
   ```
   </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@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [chore](distribute plan) add Javadoc to UnassignedJob.computeAssignedJobs and related methods [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63743:
URL: https://github.com/apache/doris/pull/63743#issuecomment-4590075443

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 170795 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
   TPC-DS sf100 test result on commit ee639c90de86e2ca64eb37410ab15996b7be8c04, data reload: false
   
   query5	4343	647	509	509
   query6	321	212	215	212
   query7	4232	562	319	319
   query8	324	235	228	228
   query9	8760	4007	4012	4007
   query10	460	353	306	306
   query11	5792	2343	2184	2184
   query12	185	128	125	125
   query13	1298	629	477	477
   query14	6103	5936	5126	5126
   query14_1	4466	4501	4457	4457
   query15	219	206	189	189
   query16	1012	469	477	469
   query17	976	716	582	582
   query18	2447	495	355	355
   query19	224	199	164	164
   query20	136	133	127	127
   query21	212	136	114	114
   query22	13671	13527	13521	13521
   query23	17437	16488	16249	16249
   query23_1	16251	16316	16458	16316
   query24	7492	1765	1303	1303
   query24_1	1360	1312	1301	1301
   query25	561	483	416	416
   query26	1310	317	171	171
   query27	2733	577	349	349
   query28	4431	2015	2024	2015
   query29	983	633	500	500
   query30	315	248	200	200
   query31	1140	1083	954	954
   query32	88	72	73	72
   query33	525	354	305	305
   query34	1208	1157	659	659
   query35	781	810	692	692
   query36	1362	1430	1252	1252
   query37	157	105	94	94
   query38	3238	3159	3089	3089
   query39	942	932	889	889
   query39_1	884	882	873	873
   query40	237	151	131	131
   query41	73	69	67	67
   query42	112	111	110	110
   query43	333	342	292	292
   query44	
   query45	220	210	194	194
   query46	1090	1196	768	768
   query47	2339	2373	2308	2308
   query48	393	403	300	300
   query49	652	506	395	395
   query50	1015	357	254	254
   query51	4385	4307	4246	4246
   query52	108	110	98	98
   query53	269	287	204	204
   query54	337	288	279	279
   query55	95	95	88	88
   query56	321	325	313	313
   query57	1444	1430	1340	1340
   query58	331	275	279	275
   query59	1597	1673	1478	1478
   query60	340	331	332	331
   query61	188	186	183	183
   query62	725	656	591	591
   query63	251	203	210	203
   query64	2450	878	738	738
   query65	
   query66	1721	496	356	356
   query67	29196	29742	29593	29593
   query68	
   query69	475	333	307	307
   query70	1032	1053	996	996
   query71	300	278	268	268
   query72	3108	2797	2429	2429
   query73	858	778	432	432
   query74	5099	4978	4753	4753
   query75	2697	2645	2246	2246
   query76	2279	1141	794	794
   query77	411	424	339	339
   query78	12300	12640	11784	11784
   query79	1513	1004	744	744
   query80	677	538	446	446
   query81	459	278	238	238
   query82	2140	160	120	120
   query83	354	268	257	257
   query84	308	146	120	120
   query85	920	545	455	455
   query86	408	335	331	331
   query87	3463	3386	3229	3229
   query88	3636	2746	2740	2740
   query89	468	387	345	345
   query90	1891	190	181	181
   query91	175	167	138	138
   query92	81	78	70	70
   query93	1557	1429	862	862
   query94	556	346	310	310
   query95	670	383	433	383
   query96	1023	796	351	351
   query97	2732	2722	2586	2586
   query98	241	234	231	231
   query99	1177	1155	1023	1023
   Total cold run time: 254553 ms
   Total hot run time: 170795 ms
   ```
   </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@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [chore](distribute plan) add Javadoc to UnassignedJob.computeAssignedJobs and related methods [doris]

Posted by "924060929 (via GitHub)" <gi...@apache.org>.
924060929 commented on PR #63743:
URL: https://github.com/apache/doris/pull/63743#issuecomment-4553664746

   /review


-- 
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@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [chore](distribute plan) add Javadoc to UnassignedJob.computeAssignedJobs and related methods [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63743:
URL: https://github.com/apache/doris/pull/63743#issuecomment-4589654973

   # FE UT Coverage Report
   Increment line coverage `  100% (0/0)` :tada:
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/63743_ee639c90de86e2ca64eb37410ab15996b7be8c04/fe_increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/63743_ee639c90de86e2ca64eb37410ab15996b7be8c04/fe_report/index.html)
   


-- 
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@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [refactor](nereids) add Javadoc to UnassignedJob.computeAssignedJobs and related methods [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63743:
URL: https://github.com/apache/doris/pull/63743#issuecomment-4553081673

   
   Thank you for your contribution to Apache Doris.
   Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/How+to+process+your+PR).
   
   Please clearly describe your PR:
   1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
   2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
   3. What features were added. Why was this function added?
   4. Which code was refactored and why was this part of the code refactored?
   5. Which functions were optimized and what is the difference before and after the optimization?
       


-- 
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@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [chore](distribute plan) add Javadoc to UnassignedJob.computeAssignedJobs and related methods [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #63743:
URL: https://github.com/apache/doris/pull/63743#issuecomment-4553891504

   PR approved by at least one committer and no changes requested.


-- 
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@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org