Skip to content

[fix](auto partition) restrict dummy load locations to current compute group - #66083

Open
sollhui wants to merge 7 commits into
apache:masterfrom
sollhui:fix/cir-20981-dummy-location-compute-group
Open

[fix](auto partition) restrict dummy load locations to current compute group#66083
sollhui wants to merge 7 commits into
apache:masterfrom
sollhui:fix/cir-20981-dummy-location-compute-group

Conversation

@sollhui

@sollhui sollhui commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Automatic partition loads with no physical partitions create dummy tablet locations. The previous logic sampled from all alive backends in a cloud instance, allowing a backend from another compute group to be selected. Restrict candidates to load-available, non-decommissioning backends in the current compute group before choosing a dummy location.

Release note

Fix automatic partition loads to choose dummy tablet locations from the current compute group.

Check List (For Author)

  • Test: Unit Test
    • ./run-fe-ut.sh --run org.apache.doris.planner.OlapTableSinkTest
    • DISABLE_BUILD_UI=ON ./build.sh --fe
  • Behavior changed: Yes. Dummy tablet locations are now selected only from load-available backends in the current compute group.
  • Does this need documentation: No

### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: Automatic partition loads with no physical partitions create dummy tablet locations. The previous logic sampled from all alive backends in a cloud instance, allowing a backend from another compute group to be selected. Restrict candidates to load-available, non-decommissioning backends in the current compute group before choosing a dummy location.

### Release note

Fix automatic partition loads to choose dummy tablet locations from the current compute group.

### Check List (For Author)

- Test: Unit Test
    - ./run-fe-ut.sh --run org.apache.doris.planner.OlapTableSinkTest
    - DISABLE_BUILD_UI=ON ./build.sh --fe
- Behavior changed: Yes. Dummy tablet locations are now selected only from load-available backends in the current compute group.
- Does this need documentation: No
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See 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?

@sollhui

sollhui commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@sollhui

sollhui commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

/review

morrySnow
morrySnow previously approved these changes Jul 27, 2026
@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label Jul 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Request changes: the new eligibility predicate correctly restricts dummy locations to load-available, non-decommissioning backends in the current compute group, but two blocking issues remain in the changed path.

Critical checkpoint conclusions:

  • Goal and correctness: the main current-group selection goal is implemented and the empty-set path fails explicitly, but single-replica automatic-partition planning can now exhaust its shared candidate list across materialized indexes and fail before execution.
  • Scope and reuse: the diff is small and uses the established backend selector predicate. However, getBackendsByCurrentCluster() has auto-start side effects that are unsafe at the sink call sites' current lock scope.
  • Concurrency and lifecycle: backend state is sampled without adding shared mutable state or new locks. The blocking issue is that stream, routine, and broker load planning can retain destination-table read locks across a meta-service resume RPC and multi-minute wait.
  • Configuration, compatibility, persistence, and protocol: no new configuration, thrift field, storage format, EditLog state, or rolling-upgrade compatibility surface is introduced.
  • Parallel paths: insert, stream load, broker load, routine load, group commit, adaptive-bucket handling, cloud/non-cloud selection, and the remote-sink subclass were traced. Group commit bypasses location construction; the remote dummy-location namespace mismatch and virtual-group auto-start ordering are pre-existing rather than distinct regressions in this PR.
  • Tests: the added unit test deterministically proves use of the current-group API and exclusion of a load-disabled backend. It does not cover the accepted multi-index/single-replica failure or the auto-start-under-lock path. Per the review-runner contract, no local build or test was run; the live PR currently shows compile and Checkstyle passing while FE UT remains pending.
  • Error handling, observability, and performance: unavailable candidates hard-fail and the existing logging is adequate. The unresolved multi-minute metadata-lock hold is the material performance/lifecycle concern.
  • User focus: no additional user-provided review focus was supplied; the full PR was reviewed.

Please address both inline findings and add focused coverage before merge.

SystemInfoService clusterInfo = Env.getCurrentSystemInfo();
List<Long> aliveBe = clusterInfo.getAllBackendIds(true);
if (aliveBe.isEmpty()) {
List<Long> availableBeIds = clusterInfo.getBackendsByCurrentCluster().values().stream()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P1] Avoid auto-start waits while the table read lock is held

getBackendsByCurrentCluster() is not just a snapshot lookup in cloud mode: it calls waitForAutoStart(), which can issue a meta-service RPC and then retry for roughly five minutes. Both StreamLoadHandler.generatePlan and RoutineLoadJob.plan hold the destination table read lock across this sink initialization. If the group transitions out of NORMAL, planning can therefore retain the metadata lock throughout the external wait and block schema changes or other table writers; the old getAllBackendIds(true) call could not do that. Resolve/wake the compute group before taking the table lock, or keep sink initialization on a nonblocking already-resolved backend snapshot.

int nodeIndex = random.nextInt(nodes.length);
if (singleReplicaLoad) {
List<Long> slaveBe = aliveBe;
List<Long> slaveBe = availableBeIds;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P1] Keep backend candidates intact across index iterations

slaveBe aliases availableBeIds, so remove(nodeIndex) permanently shrinks the source used by the next loop iteration. With single-replica load enabled, an empty automatic-partition table with two indexes and one eligible BE in the current compute group handles index 0, then builds an empty nodes array and throws from nextInt(0) for index 1. The current-group filter makes this reachable even when other alive BEs exist outside the group. Keep the removal local to each index and add a multi-index/single-replica test:

Suggested change
List<Long> slaveBe = availableBeIds;
List<Long> slaveBe = new ArrayList<>(availableBeIds);

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29577 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 5dc64e9f2c24153e183081d133803b5d21869b8a, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17611	4287	4288	4287
q2	2050	327	200	200
q3	10225	1382	826	826
q4	4689	477	345	345
q5	7492	861	578	578
q6	199	181	144	144
q7	772	825	618	618
q8	9969	1657	1655	1655
q9	5833	4345	4367	4345
q10	6808	1729	1454	1454
q11	500	364	335	335
q12	789	590	480	480
q13	18114	3314	2690	2690
q14	268	270	250	250
q15	q16	788	772	715	715
q17	1040	887	949	887
q18	6959	5766	5542	5542
q19	1535	1257	1049	1049
q20	796	683	597	597
q21	5943	2654	2275	2275
q22	437	368	305	305
Total cold run time: 102817 ms
Total hot run time: 29577 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4571	4465	4291	4291
q2	298	344	226	226
q3	4592	5015	4421	4421
q4	2314	2362	1548	1548
q5	4457	4300	4310	4300
q6	232	196	134	134
q7	2254	1934	1678	1678
q8	2664	2284	2243	2243
q9	7746	7767	7817	7767
q10	4696	4676	4278	4278
q11	810	459	430	430
q12	771	782	599	599
q13	3348	3614	2988	2988
q14	300	305	275	275
q15	q16	746	745	672	672
q17	1398	1396	1408	1396
q18	8161	7566	6941	6941
q19	1115	1110	1090	1090
q20	2238	2238	1968	1968
q21	5339	4796	4681	4681
q22	538	480	407	407
Total cold run time: 58588 ms
Total hot run time: 52333 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 177482 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 5dc64e9f2c24153e183081d133803b5d21869b8a, data reload: false

query5	4343	627	470	470
query6	455	234	205	205
query7	4876	619	344	344
query8	340	184	174	174
query9	8757	4065	4070	4065
query10	447	365	294	294
query11	5875	2360	2092	2092
query12	160	109	102	102
query13	1262	572	430	430
query14	6285	5174	4873	4873
query14_1	4261	4221	4213	4213
query15	216	205	176	176
query16	1014	462	440	440
query17	1100	701	554	554
query18	2584	470	364	364
query19	210	191	153	153
query20	116	110	106	106
query21	237	161	138	138
query22	13590	13580	13383	13383
query23	17411	16519	16087	16087
query23_1	16146	16161	16278	16161
query24	8003	1763	1337	1337
query24_1	1380	1290	1304	1290
query25	583	482	411	411
query26	1350	350	228	228
query27	2537	581	381	381
query28	4441	2001	1984	1984
query29	1100	624	500	500
query30	349	266	223	223
query31	1124	1118	980	980
query32	121	65	62	62
query33	551	331	258	258
query34	1174	1132	622	622
query35	766	770	684	684
query36	1170	1173	1028	1028
query37	164	111	95	95
query38	1889	1708	1674	1674
query39	887	871	848	848
query39_1	850	836	839	836
query40	253	175	148	148
query41	73	71	70	70
query42	97	95	97	95
query43	333	330	288	288
query44	1462	789	776	776
query45	201	195	178	178
query46	1084	1194	741	741
query47	2098	2089	1974	1974
query48	406	418	306	306
query49	598	429	317	317
query50	1094	430	322	322
query51	11003	11033	11019	11019
query52	90	88	76	76
query53	265	286	203	203
query54	299	248	233	233
query55	78	71	69	69
query56	312	315	314	314
query57	1350	1277	1200	1200
query58	310	264	275	264
query59	1550	1640	1434	1434
query60	376	266	258	258
query61	154	144	151	144
query62	546	507	431	431
query63	249	201	207	201
query64	2680	1015	843	843
query65	4705	4584	4654	4584
query66	1791	503	389	389
query67	29285	29201	29068	29068
query68	3179	1604	991	991
query69	402	321	262	262
query70	1033	952	966	952
query71	366	329	298	298
query72	3012	2740	2319	2319
query73	816	796	438	438
query74	5061	4922	4695	4695
query75	2546	2487	2146	2146
query76	2348	1166	774	774
query77	367	373	286	286
query78	11752	11902	11281	11281
query79	1463	1210	727	727
query80	1302	577	490	490
query81	559	343	286	286
query82	602	160	119	119
query83	369	327	299	299
query84	291	158	132	132
query85	1010	625	545	545
query86	435	301	262	262
query87	1831	1816	1738	1738
query88	3693	2789	2799	2789
query89	437	373	332	332
query90	1863	197	197	197
query91	206	194	162	162
query92	63	61	54	54
query93	1753	1476	1051	1051
query94	732	351	299	299
query95	785	494	473	473
query96	1017	803	356	356
query97	2625	2619	2478	2478
query98	213	209	198	198
query99	1081	1114	971	971
Total cold run time: 264418 ms
Total hot run time: 177482 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.23 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 5dc64e9f2c24153e183081d133803b5d21869b8a, data reload: false

query1	0.01	0.01	0.01
query2	0.10	0.05	0.04
query3	0.26	0.14	0.16
query4	1.61	0.15	0.14
query5	0.25	0.22	0.22
query6	1.28	1.09	1.08
query7	0.04	0.01	0.00
query8	0.06	0.04	0.04
query9	0.38	0.33	0.32
query10	0.56	0.55	0.53
query11	0.19	0.13	0.13
query12	0.18	0.14	0.14
query13	0.48	0.47	0.48
query14	1.04	1.02	1.01
query15	0.62	0.60	0.60
query16	0.34	0.32	0.31
query17	1.09	1.13	1.13
query18	0.23	0.22	0.21
query19	2.13	1.98	1.98
query20	0.02	0.02	0.01
query21	15.43	0.20	0.13
query22	4.98	0.06	0.06
query23	16.10	0.30	0.12
query24	2.97	0.42	0.32
query25	0.11	0.06	0.05
query26	0.73	0.21	0.14
query27	0.03	0.03	0.04
query28	3.55	0.94	0.53
query29	12.56	4.20	3.30
query30	0.27	0.16	0.15
query31	2.76	0.62	0.31
query32	3.23	0.60	0.48
query33	3.19	3.21	3.29
query34	15.48	4.22	3.55
query35	3.54	3.54	3.55
query36	0.54	0.42	0.42
query37	0.08	0.07	0.06
query38	0.06	0.04	0.04
query39	0.03	0.03	0.03
query40	0.20	0.16	0.15
query41	0.09	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.04
Total cold run time: 96.88 s
Total hot run time: 25.23 s

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 62.50% (5/8) 🎉
Increment coverage report
Complete coverage report

Problem Summary:

Dummy location planning could wait for cloud compute group auto-start while holding a table read lock. Single-replica planning also mutated the shared backend candidate list across index iterations.

Solution:

Use a nonblocking compute-group backend snapshot in cloud mode and preserve the existing non-cloud lookup. Copy backend candidates for each single-replica index before removing the primary backend.

Tests:

- Extend OlapTableSinkTest to verify the auto-starting current-cluster API is not called.
- Add single-backend, multi-index single-replica coverage.
@github-actions github-actions Bot removed the approved Indicates a PR has been approved by one committer. label Jul 27, 2026
@sollhui

sollhui commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@sollhui

sollhui commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Request changes: the current-group and per-index candidate fixes are sound for active compute groups, but one blocking cloud auto-start path remains.

Critical checkpoint conclusions:

  • Goal and correctness: active-group dummy locations are now restricted to load-available, non-decommissioning backends in the selected compute group, and the per-index candidate list is no longer mutated. The goal is still incomplete because a suspended current group can fail before auto-start when legacy Nereids distribution is selected.
  • Scope and reuse: the two-file change is small and uses established backend eligibility predicates. The accepted issue is an ordering gap between compute-group resolution and sink finalization, not unnecessary code expansion.
  • Concurrency and locking: no new shared mutable state or lock-order cycle is introduced. Sink finalization still occurs under the destination-table read lock; waking/resolving must happen before that lock, while this helper consumes a side-effect-free snapshot.
  • Lifecycle: ConnectContext installation, compute-group propagation, and cleanup were traced across insert and background load paths. No static-initialization, ownership-cycle, or resource-release issue was found.
  • Configuration and compatibility: no new configuration, thrift field, FE-BE variable, storage format, symbol, or rolling-upgrade surface is added. The existing supported enable_nereids_distribute_planner=false branch exposes the accepted failure.
  • Parallel paths: SQL insert, stream load, broker load, routine load, group commit, cloud/non-cloud selection, single-replica loading, multiple indexes, remote sinks, and BE incremental location replacement were reviewed. No additional distinct issue remained after duplicate suppression.
  • Tests and results: the added unit tests cover current-group/load-availability filtering and the fixed one-backend/two-index mutation. They do not cover a suspended auto-start group with legacy distribution disabled. Per the review-runner contract, no build or test command was run locally.
  • Error handling and observability: empty candidate sets fail explicitly and no new metrics or logging are required. The accepted issue is that a recoverable suspended-group state is converted into that failure too early.
  • Transactions, persistence, and data writes: no EditLog, transaction protocol, or persistence format changes are introduced. The accepted failure occurs during planning before dispatch; no separate atomicity or failover defect was found.
  • Performance: backend snapshot/filter/copy costs are bounded by backend and index counts. No new hot-path issue distinct from already-known review context was found.
  • User focus: no additional user-provided review focus was supplied; the full PR was reviewed.

Please address the inline auto-start finding and add focused coverage before merge.

### What problem does this PR solve?

Problem Summary: Switching dummy location creation to a nonblocking backend snapshot avoided waiting under a table read lock, but legacy Nereids distribution could reach sink finalization for a suspended compute group before any auto-start occurred. Wake the selected compute group immediately before acquiring the sink-finalization table lock, while keeping location creation side-effect free.

### Release note

None

### Check List (For Author)

- Test: Unit Test added; not run locally per request

- Behavior changed: Yes. Suspended compute groups are resumed before OLAP sink finalization without holding the table read lock

- Does this need documentation: No
@sollhui

sollhui commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@sollhui

sollhui commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

/review

### What problem does this PR solve?

Problem Summary: Newly added dummy-location variables used the older cluster terminology even though they represent the selected compute group's backend set. Rename only those local and test variables while retaining existing compatibility APIs.

### Release note

None

### Check List (For Author)

- Test: Not run locally per request; naming-only change

- Behavior changed: No

- Does this need documentation: No
@sollhui

sollhui commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@sollhui

sollhui commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Request changes: the current-compute-group eligibility filter and the per-index candidate copy are sound, but three P1 lifecycle and parallel-path defects remain.

Critical checkpoint conclusions:

  • Goal and correctness: dummy locations are now restricted to load-available, non-decommissioning backends in the selected compute group. The goal is incomplete because auto-start failure leaks a registered load job, two load entry points do not pre-wake suspended groups, and the lock-free wait can invalidate the supposedly newest table reference.
  • Scope and reuse: the four-file diff is focused and uses established backend predicates. The new helper is placed too narrowly in InsertIntoTableCommand; the pre-wake/resolved snapshot needs to be shared by every caller of dummy-location planning.
  • Concurrency and locking: the normal insert wait is outside the final table read lock, but its table lookup precedes the long lock-free interval, allowing drop/recreate to evade the identity check. Virtual active/standby resolution can also still perform failover I/O under existing table-lock scopes; that concern is already covered by the earlier lock-wait thread and is not duplicated here.
  • Lifecycle and error handling: OlapInsertExecutor registers its InsertLoadJob before the new wait, while the wait remains outside the only onFail cleanup scope. A thrown wait therefore leaves a non-expiring PENDING job.
  • Configuration and compatibility: no new configuration, thrift field, storage format, EditLog state, symbol, or rolling-upgrade surface is introduced. The supported legacy-distribution and cloud auto-start branches expose the accepted defects.
  • Parallel paths: normal insert, transaction-mode values insert, stream load, broker load, routine load, group commit, remote sinks, cloud/non-cloud selection, logical/virtual groups, single-replica loading, and multiple indexes were traced. Transactional values and cloud broker load are the two nonduplicate uncovered callers; stream/routine and virtual failover concerns are already represented by existing review context, while group-commit sinks bypass this dummy-location branch.
  • Tests and results: the added unit tests cover current-group/load-availability filtering, per-index candidate isolation, and the helper happy path. They do not cover wait failure cleanup, suspended transaction/broker callers, drop/recreate ordering, or virtual failover I/O. Per the review-runner contract, no local build or test command was run.
  • Transactions, persistence, and data writes: no transaction protocol or persistent-format change is added. The defects occur during planning, before or around transaction initialization, and can leave load metadata behind or plan against a removed table ID.
  • Performance and observability: backend filtering/copy costs are bounded and no new metric is required. The remaining lock-held virtual failover I/O is already covered by the existing thread; leaked pending load jobs are the new observability and memory concern.
  • User focus: no additional user-provided focus was supplied; the full PR was reviewed.

Please address all three inline findings and add focused regression coverage before merge.

});
}

// lock after plan and check does table's schema changed to ensure we lock table order by id.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P1] Re-resolve the target after the auto-start wait

newestTargetTableIf is captured before a wait that can last roughly five minutes and intentionally holds no metadata lock. If the table is dropped and recreated under the same qualified name during that wait, both targetTableIf and this variable still reference the detached old object, so the later ID and schema comparisons pass old-vs-old and sink finalization starts with the removed table ID instead of retrying against the replacement. Perform the wait before this final lookup, or re-fetch by name after it and lock that newly resolved object; a latch-based drop/recreate test would cover the ordering.

}

// lock after plan and check does table's schema changed to ensure we lock table order by id.
TableIf newestTargetTableIf = getTargetTableIf(ctx, qualifiedTargetTableName);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P1] Clean up the registered load job when auto-start fails

For a non-inline INSERT ... SELECT with legacy distribution, the OlapInsertExecutor has already registered its InsertLoadJob before this call. If waitForAutoStart() throws (for example on manual shutdown, an RPC error, or resume timeout), execution never enters the following try/catch, so onFail() and recordFinishedLoadJob() are skipped. The job remains PENDING, and incomplete load jobs never expire, so retries accumulate permanent SHOW LOAD entries and memory. Include this wait in the executor cleanup scope (or perform it before registration), and cover the throwing path.

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29740 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit e9e5a7be04d9897e29306f37083be926a79cc139, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17711	4127	4195	4127
q2	2014	325	210	210
q3	10267	1436	812	812
q4	4690	467	341	341
q5	7502	854	564	564
q6	186	176	141	141
q7	799	821	612	612
q8	9345	1670	1557	1557
q9	5704	4354	4351	4351
q10	6749	1757	1483	1483
q11	519	346	326	326
q12	707	574	471	471
q13	18131	3381	2754	2754
q14	265	274	238	238
q15	q16	786	773	706	706
q17	938	997	993	993
q18	6965	5831	5493	5493
q19	1305	1378	1141	1141
q20	808	680	586	586
q21	5843	2536	2599	2536
q22	421	349	298	298
Total cold run time: 101655 ms
Total hot run time: 29740 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4426	4371	4394	4371
q2	287	325	225	225
q3	4590	4932	4425	4425
q4	2041	2159	1430	1430
q5	4427	4315	4316	4315
q6	230	171	129	129
q7	1750	2115	1814	1814
q8	2608	2262	2263	2262
q9	8125	8270	7772	7772
q10	4671	4665	4226	4226
q11	580	430	380	380
q12	739	769	570	570
q13	3402	3622	2963	2963
q14	318	309	271	271
q15	q16	737	721	664	664
q17	1380	1346	1320	1320
q18	8023	7476	7383	7383
q19	1193	1106	1074	1074
q20	2225	2197	1956	1956
q21	5324	4708	4463	4463
q22	510	468	408	408
Total cold run time: 57586 ms
Total hot run time: 52421 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 177612 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit e9e5a7be04d9897e29306f37083be926a79cc139, data reload: false

query5	4340	626	476	476
query6	464	228	198	198
query7	4843	600	339	339
query8	335	191	175	175
query9	8749	4123	4146	4123
query10	494	344	298	298
query11	5913	2332	2168	2168
query12	158	105	99	99
query13	1280	606	438	438
query14	6211	5194	4903	4903
query14_1	4250	4233	4254	4233
query15	217	203	178	178
query16	1008	463	447	447
query17	920	696	552	552
query18	2449	458	334	334
query19	211	199	142	142
query20	109	106	106	106
query21	253	158	139	139
query22	13555	13526	13494	13494
query23	17253	16396	16055	16055
query23_1	16199	16260	16301	16260
query24	7541	1777	1273	1273
query24_1	1316	1315	1301	1301
query25	577	465	396	396
query26	1351	381	227	227
query27	2615	577	384	384
query28	4500	2005	1992	1992
query29	1087	632	504	504
query30	350	272	231	231
query31	1118	1099	989	989
query32	114	64	64	64
query33	522	321	258	258
query34	1168	1201	634	634
query35	771	791	660	660
query36	1206	1169	1051	1051
query37	160	101	93	93
query38	1881	1716	1651	1651
query39	891	864	855	855
query39_1	840	835	852	835
query40	256	170	144	144
query41	77	70	70	70
query42	98	94	93	93
query43	324	327	282	282
query44	1422	774	759	759
query45	208	184	177	177
query46	1048	1183	720	720
query47	2112	2105	1988	1988
query48	431	448	300	300
query49	593	426	323	323
query50	1145	442	330	330
query51	10604	10331	10671	10331
query52	89	89	75	75
query53	277	290	212	212
query54	293	246	230	230
query55	77	75	70	70
query56	313	302	307	302
query57	1306	1288	1242	1242
query58	305	278	268	268
query59	1620	1653	1463	1463
query60	307	293	303	293
query61	151	149	146	146
query62	535	497	432	432
query63	244	213	203	203
query64	2837	1023	866	866
query65	4766	4620	4616	4616
query66	1808	504	385	385
query67	29302	29100	29039	29039
query68	3364	1494	992	992
query69	416	290	285	285
query70	1091	965	967	965
query71	402	344	315	315
query72	3040	2912	2335	2335
query73	856	769	444	444
query74	5098	4917	4725	4725
query75	2578	2467	2133	2133
query76	2321	1165	779	779
query77	343	368	291	291
query78	12037	11771	11211	11211
query79	1404	1217	710	710
query80	1295	584	475	475
query81	535	336	289	289
query82	667	153	121	121
query83	405	327	300	300
query84	334	160	128	128
query85	997	608	514	514
query86	428	295	286	286
query87	1834	1839	1743	1743
query88	3690	2756	2755	2755
query89	442	392	326	326
query90	1898	209	198	198
query91	205	195	165	165
query92	63	59	55	55
query93	1648	1560	984	984
query94	745	350	335	335
query95	787	507	579	507
query96	1012	748	376	376
query97	2620	2625	2486	2486
query98	216	209	203	203
query99	1108	1113	976	976
Total cold run time: 263830 ms
Total hot run time: 177612 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.04 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit e9e5a7be04d9897e29306f37083be926a79cc139, data reload: false

query1	0.00	0.01	0.00
query2	0.10	0.05	0.05
query3	0.25	0.14	0.14
query4	1.61	0.14	0.14
query5	0.24	0.22	0.22
query6	1.28	1.08	1.08
query7	0.03	0.01	0.00
query8	0.06	0.04	0.03
query9	0.39	0.30	0.30
query10	0.54	0.58	0.55
query11	0.19	0.14	0.13
query12	0.18	0.15	0.15
query13	0.48	0.48	0.48
query14	1.01	1.02	1.02
query15	0.62	0.60	0.60
query16	0.30	0.32	0.30
query17	1.09	1.14	1.08
query18	0.23	0.21	0.20
query19	2.12	1.93	1.97
query20	0.01	0.01	0.01
query21	15.44	0.22	0.14
query22	4.89	0.06	0.06
query23	16.08	0.31	0.12
query24	3.03	0.43	0.32
query25	0.11	0.05	0.04
query26	0.74	0.22	0.15
query27	0.04	0.04	0.03
query28	3.45	0.95	0.53
query29	12.51	4.17	3.29
query30	0.27	0.14	0.15
query31	2.77	0.59	0.32
query32	3.22	0.59	0.48
query33	3.11	3.37	3.17
query34	15.63	4.24	3.54
query35	3.54	3.55	3.53
query36	0.55	0.44	0.42
query37	0.09	0.07	0.06
query38	0.06	0.04	0.03
query39	0.04	0.02	0.03
query40	0.18	0.16	0.16
query41	0.10	0.03	0.02
query42	0.04	0.03	0.03
query43	0.04	0.04	0.03
Total cold run time: 96.66 s
Total hot run time: 25.04 s

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 76.19% (16/21) 🎉
Increment coverage report
Complete coverage report

### What problem does this PR solve?

Related PR: apache#66083

Problem Summary: Dummy-location planning could keep a stale target table after a long compute-group auto-start wait, leak a registered insert load job when that wait failed, and reach sink planning before auto-start in transactional VALUES and cloud broker load paths. Re-resolve the target after the wait, clean up failed insert executors, and share the pre-planning auto-start step across all affected callers.

### Release note

None

### Check List (For Author)

- Test: Unit tests added for target re-resolution, wait-failure cleanup, transactional VALUES, and cloud broker load; not run locally per request
- Behavior changed: Yes. Suspended compute groups are resumed before dummy-location planning in all affected load paths
- Does this need documentation: No
@sollhui
sollhui requested a review from gavinchou as a code owner July 27, 2026 12:51
@sollhui

sollhui commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@sollhui

sollhui commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

/review

### What problem does this PR solve?

Related PR: apache#66083

Problem Summary: Transactional VALUES insert looked up the target table immediately before the compute-group auto-start wait and then discarded that result. Remove the redundant lookup and resolve the target only after the wait.

### Release note

None

### Check List (For Author)

- Test: Not run locally per request; covered by the existing batch insert auto-start unit test
- Behavior changed: No
- Does this need documentation: No
@sollhui

sollhui commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@sollhui

sollhui commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

/review

@github-actions

Copy link
Copy Markdown
Contributor

Codex automated review failed and did not complete.

Error: You've hit your usage limit. Visit https://chatgpt.com/codex/settings/usage to purchase more credits or try again at Aug 2nd, 2026 1:27 AM.
Workflow run: https://github.com/apache/doris/actions/runs/30268290682

Please inspect the workflow logs and rerun the review after the underlying issue is resolved.

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29540 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit d407bcf5db670c6be8276cc01ace3e3f4744bd82, data reload: false

------ Round 1 ----------------------------------
============================================
q1	14896	4179	4133	4133
q2	1879	326	217	217
q3	6483	1555	870	870
q4	3505	470	357	357
q5	1651	871	581	581
q6	191	186	143	143
q7	776	804	617	617
q8	2053	1470	1484	1470
q9	4569	4440	4432	4432
q10	1914	1745	1464	1464
q11	495	377	324	324
q12	558	589	457	457
q13	3108	3566	2685	2685
q14	273	254	241	241
q15	q16	762	791	717	717
q17	927	1110	1030	1030
q18	6854	5762	5626	5626
q19	1037	1321	937	937
q20	793	706	604	604
q21	3188	2328	2568	2328
q22	427	365	307	307
Total cold run time: 56339 ms
Total hot run time: 29540 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4516	4477	4454	4454
q2	304	324	218	218
q3	4612	4987	4452	4452
q4	2109	2163	1370	1370
q5	4514	4260	4329	4260
q6	231	180	132	132
q7	1756	1642	1483	1483
q8	2286	2107	1994	1994
q9	7244	7289	7265	7265
q10	4629	4617	4210	4210
q11	568	417	369	369
q12	780	760	538	538
q13	3065	3435	2811	2811
q14	292	287	268	268
q15	q16	706	718	612	612
q17	1314	1294	1268	1268
q18	7423	6959	6873	6873
q19	1136	1085	1123	1085
q20	2230	2214	1945	1945
q21	5318	4773	4560	4560
q22	539	477	425	425
Total cold run time: 55572 ms
Total hot run time: 50592 ms

@github-actions

Copy link
Copy Markdown
Contributor

Codex automated review failed and did not complete.

Error: You've hit your usage limit. Visit https://chatgpt.com/codex/settings/usage to purchase more credits or try again at Aug 2nd, 2026 1:27 AM.
Workflow run: https://github.com/apache/doris/actions/runs/30270415447

Please inspect the workflow logs and rerun the review after the underlying issue is resolved.

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 178194 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit d407bcf5db670c6be8276cc01ace3e3f4744bd82, data reload: false

query5	4354	652	480	480
query6	465	221	208	208
query7	4869	618	314	314
query8	336	188	167	167
query9	8794	4090	4086	4086
query10	478	368	306	306
query11	6154	2336	2139	2139
query12	171	106	100	100
query13	1292	615	414	414
query14	7062	5180	4843	4843
query14_1	4249	4246	4171	4171
query15	215	200	181	181
query16	1035	477	454	454
query17	1208	714	556	556
query18	2764	469	333	333
query19	206	186	151	151
query20	112	107	107	107
query21	232	158	144	144
query22	13523	13672	13419	13419
query23	17302	16459	16101	16101
query23_1	16310	16216	16281	16216
query24	7544	1789	1285	1285
query24_1	1291	1301	1288	1288
query25	582	468	402	402
query26	1315	351	218	218
query27	2475	581	386	386
query28	4358	2013	2002	2002
query29	1096	658	510	510
query30	344	263	235	235
query31	1143	1104	979	979
query32	106	66	64	64
query33	531	326	275	275
query34	1171	1136	652	652
query35	790	766	676	676
query36	1218	1199	1020	1020
query37	159	111	95	95
query38	1869	1718	1647	1647
query39	903	881	853	853
query39_1	831	822	823	822
query40	245	167	145	145
query41	73	67	69	67
query42	98	95	101	95
query43	318	331	281	281
query44	1455	783	764	764
query45	201	193	173	173
query46	1076	1234	747	747
query47	2188	2139	2039	2039
query48	424	440	306	306
query49	596	431	357	357
query50	1046	440	341	341
query51	10651	10643	10719	10643
query52	90	89	78	78
query53	261	294	210	210
query54	300	257	231	231
query55	78	74	73	73
query56	369	307	308	307
query57	1309	1254	1205	1205
query58	301	270	265	265
query59	1544	1643	1443	1443
query60	314	284	271	271
query61	183	227	151	151
query62	546	493	422	422
query63	244	207	201	201
query64	2745	1022	836	836
query65	4713	4627	4644	4627
query66	1777	501	394	394
query67	29240	29261	29066	29066
query68	3217	1530	1026	1026
query69	423	315	268	268
query70	1088	942	962	942
query71	384	332	324	324
query72	3076	2758	2365	2365
query73	847	853	434	434
query74	5095	4938	4768	4768
query75	2541	2479	2157	2157
query76	2344	1167	780	780
query77	352	369	296	296
query78	11799	11770	11282	11282
query79	1382	1208	757	757
query80	1372	550	475	475
query81	528	342	281	281
query82	616	161	121	121
query83	374	337	303	303
query84	277	164	130	130
query85	995	624	514	514
query86	418	296	283	283
query87	1819	1827	1739	1739
query88	3747	2797	2773	2773
query89	432	381	335	335
query90	1972	204	200	200
query91	206	190	174	174
query92	62	61	57	57
query93	1709	1548	920	920
query94	715	382	305	305
query95	788	514	579	514
query96	1047	818	355	355
query97	2633	2627	2517	2517
query98	212	209	206	206
query99	1086	1113	970	970
Total cold run time: 265120 ms
Total hot run time: 178194 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.05 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit d407bcf5db670c6be8276cc01ace3e3f4744bd82, data reload: false

query1	0.03	0.01	0.01
query2	0.10	0.05	0.05
query3	0.26	0.13	0.13
query4	1.61	0.13	0.14
query5	0.24	0.23	0.23
query6	1.23	1.07	1.06
query7	0.04	0.00	0.00
query8	0.06	0.04	0.03
query9	0.40	0.32	0.30
query10	0.56	0.58	0.56
query11	0.19	0.14	0.14
query12	0.18	0.14	0.14
query13	0.49	0.49	0.48
query14	1.02	1.02	0.99
query15	0.61	0.60	0.60
query16	0.31	0.33	0.32
query17	1.13	1.13	1.11
query18	0.21	0.22	0.21
query19	2.06	1.89	1.96
query20	0.02	0.01	0.02
query21	15.43	0.23	0.13
query22	4.80	0.06	0.05
query23	16.17	0.33	0.13
query24	2.96	0.42	0.33
query25	0.13	0.05	0.04
query26	0.73	0.21	0.15
query27	0.05	0.04	0.04
query28	3.51	0.93	0.56
query29	12.51	4.07	3.28
query30	0.28	0.15	0.16
query31	2.78	0.61	0.30
query32	3.22	0.59	0.48
query33	3.18	3.26	3.24
query34	15.51	4.19	3.52
query35	3.51	3.48	3.57
query36	0.55	0.44	0.41
query37	0.09	0.07	0.06
query38	0.05	0.04	0.04
query39	0.04	0.03	0.03
query40	0.19	0.16	0.16
query41	0.09	0.03	0.02
query42	0.04	0.03	0.03
query43	0.05	0.04	0.03
Total cold run time: 96.62 s
Total hot run time: 25.05 s

### What problem does this PR solve?

Related PR: apache#66083

Problem Summary: Dummy-location planning only needs a snapshot of load-available backends in the current compute group. Remove the pre-planning compute-group auto-start waits and their lifecycle-specific tests, while retaining the current-group snapshot and load-availability filtering in OlapTableSink.

### Release note

None

### Check List (For Author)

- Test: Not run locally per request; existing OlapTableSink unit tests cover current compute group selection and load-availability filtering
- Behavior changed: Yes. Dummy-location planning no longer initiates compute-group auto-start
- Does this need documentation: No
@sollhui

sollhui commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@sollhui

sollhui commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

/review

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29609 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 21cadf1058a02b6e5a3733a4b5a9ec25b101df72, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17646	4049	4008	4008
q2	2016	334	198	198
q3	10389	1467	823	823
q4	4683	468	340	340
q5	7568	844	572	572
q6	189	171	139	139
q7	778	834	615	615
q8	9387	1605	1579	1579
q9	5654	4397	4382	4382
q10	6755	1780	1463	1463
q11	518	363	341	341
q12	749	578	453	453
q13	18137	3503	2800	2800
q14	267	268	240	240
q15	q16	781	788	710	710
q17	1040	1041	961	961
q18	6823	5898	5536	5536
q19	1307	1248	1092	1092
q20	850	678	612	612
q21	5872	2616	2446	2446
q22	429	357	299	299
Total cold run time: 101838 ms
Total hot run time: 29609 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4367	4299	4283	4283
q2	291	325	214	214
q3	4597	4978	4424	4424
q4	2058	2143	1353	1353
q5	4388	4255	4457	4255
q6	239	173	128	128
q7	1727	2043	1831	1831
q8	2618	2187	2174	2174
q9	8013	8152	7797	7797
q10	4686	4757	4275	4275
q11	559	414	389	389
q12	778	799	540	540
q13	3188	3567	2892	2892
q14	313	297	289	289
q15	q16	770	710	635	635
q17	1353	1346	1468	1346
q18	7822	7336	7203	7203
q19	1151	1071	1094	1071
q20	2201	2199	1938	1938
q21	5187	4520	4402	4402
q22	514	443	417	417
Total cold run time: 56820 ms
Total hot run time: 51856 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 177289 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 21cadf1058a02b6e5a3733a4b5a9ec25b101df72, data reload: false

query5	4355	642	484	484
query6	467	241	211	211
query7	4878	564	325	325
query8	333	193	171	171
query9	8772	4105	4051	4051
query10	503	350	321	321
query11	5917	2340	2148	2148
query12	159	108	106	106
query13	1343	590	417	417
query14	6250	5177	4899	4899
query14_1	4261	4243	4229	4229
query15	221	217	181	181
query16	1019	471	455	455
query17	960	750	548	548
query18	2419	467	330	330
query19	198	178	142	142
query20	112	105	106	105
query21	231	151	133	133
query22	13626	13459	13365	13365
query23	17496	16484	16187	16187
query23_1	16148	16258	16199	16199
query24	7734	1759	1281	1281
query24_1	1301	1269	1272	1269
query25	536	431	351	351
query26	1331	367	204	204
query27	2592	546	377	377
query28	4550	1971	1978	1971
query29	1049	604	463	463
query30	337	259	234	234
query31	1122	1086	980	980
query32	109	63	59	59
query33	520	309	245	245
query34	1184	1144	621	621
query35	788	781	690	690
query36	1178	1158	1015	1015
query37	153	106	90	90
query38	1879	1706	1643	1643
query39	895	872	857	857
query39_1	846	834	819	819
query40	247	159	144	144
query41	65	61	61	61
query42	92	92	94	92
query43	331	323	295	295
query44	1431	772	771	771
query45	194	185	173	173
query46	1120	1184	740	740
query47	2113	2111	1998	1998
query48	391	412	301	301
query49	587	444	310	310
query50	1092	446	320	320
query51	10356	10518	10347	10347
query52	86	96	74	74
query53	256	282	203	203
query54	289	256	215	215
query55	74	73	68	68
query56	316	289	286	286
query57	1300	1281	1177	1177
query58	282	244	239	239
query59	1562	1635	1424	1424
query60	300	280	255	255
query61	146	153	152	152
query62	542	504	436	436
query63	237	197	206	197
query64	2868	1020	833	833
query65	4700	4596	4637	4596
query66	1826	508	381	381
query67	29236	29126	29005	29005
query68	3153	1570	962	962
query69	406	308	260	260
query70	1017	966	927	927
query71	374	341	344	341
query72	3079	2882	2499	2499
query73	829	782	430	430
query74	5068	4913	4684	4684
query75	2544	2476	2128	2128
query76	2322	1190	775	775
query77	369	393	292	292
query78	11969	11959	11444	11444
query79	1283	1132	731	731
query80	649	585	486	486
query81	446	342	303	303
query82	293	156	122	122
query83	314	312	292	292
query84	307	163	128	128
query85	891	613	521	521
query86	314	296	267	267
query87	1799	1832	1742	1742
query88	3656	2783	2744	2744
query89	409	383	328	328
query90	2137	205	201	201
query91	199	190	161	161
query92	61	59	54	54
query93	1588	1608	968	968
query94	537	358	307	307
query95	780	588	520	520
query96	1098	774	336	336
query97	2628	2617	2484	2484
query98	211	211	208	208
query99	1093	1113	978	978
Total cold run time: 262019 ms
Total hot run time: 177289 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.12 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 21cadf1058a02b6e5a3733a4b5a9ec25b101df72, data reload: false

query1	0.00	0.00	0.00
query2	0.10	0.04	0.05
query3	0.26	0.14	0.15
query4	1.61	0.14	0.14
query5	0.24	0.23	0.22
query6	1.26	1.06	1.06
query7	0.03	0.01	0.00
query8	0.05	0.04	0.03
query9	0.40	0.31	0.30
query10	0.54	0.54	0.53
query11	0.20	0.14	0.14
query12	0.18	0.14	0.14
query13	0.47	0.46	0.47
query14	1.03	1.01	1.01
query15	0.62	0.60	0.60
query16	0.31	0.33	0.32
query17	1.12	1.05	1.12
query18	0.22	0.22	0.21
query19	1.99	1.99	2.00
query20	0.02	0.01	0.01
query21	15.44	0.22	0.14
query22	4.86	0.06	0.05
query23	16.11	0.32	0.13
query24	2.93	0.41	0.33
query25	0.11	0.04	0.05
query26	0.73	0.20	0.14
query27	0.04	0.04	0.04
query28	3.59	0.92	0.56
query29	12.49	4.10	3.28
query30	0.27	0.15	0.16
query31	2.77	0.59	0.31
query32	3.22	0.59	0.49
query33	3.17	3.20	3.18
query34	15.79	4.22	3.56
query35	3.55	3.53	3.53
query36	0.57	0.44	0.44
query37	0.09	0.06	0.07
query38	0.05	0.04	0.04
query39	0.04	0.02	0.02
query40	0.19	0.17	0.15
query41	0.08	0.04	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.03
Total cold run time: 96.82 s
Total hot run time: 25.12 s

@github-actions

Copy link
Copy Markdown
Contributor

Codex automated review failed and did not complete.

Error: You've hit your usage limit. Visit https://chatgpt.com/codex/settings/usage to purchase more credits or try again at Aug 2nd, 2026 1:27 AM.
Workflow run: https://github.com/apache/doris/actions/runs/30276469746

Please inspect the workflow logs and rerun the review after the underlying issue is resolved.

@sollhui

sollhui commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

/review

@github-actions

Copy link
Copy Markdown
Contributor

Codex automated review failed and did not complete.

Error: Your access token could not be refreshed because your refresh token was revoked. Please log out and sign in again.
Workflow run: https://github.com/apache/doris/actions/runs/30322060301

Please inspect the workflow logs and rerun the review after the underlying issue is resolved.

@shuke987

Copy link
Copy Markdown
Contributor

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Request changes: the current head correctly restricts dummy locations to load-available, non-decommissioning backends in the selected compute group, and the per-index candidate copy fixes the earlier single-replica list mutation. It is not merge-ready because the already-filed compute-group lifecycle and lock-boundary issues remain. I found no additional nonduplicate inline issue, so this review intentionally adds no duplicate inline comments.

Critical checkpoint conclusions

  • Goal and proof: The added unit tests prove the awake-group selection and multi-index candidate-copy behavior. They do not prove the end-to-end requirement for a suspended group, where sink initialization can consume an empty nonblocking snapshot before any caller wakes the group.
  • Scope and clarity: The two-file change is small and focused, and the eligibility predicates match established load selection. The local implementation is clear, but the behavior needs a shared caller-level lifecycle fix.
  • Concurrency and locks: Backend lists are copied and the eligibility state is atomically read. The five-minute auto-start wait is gone from this helper, but a virtual compute group can still take getBackendsByClusterName() through getPhysicalCluster()switchActiveStandby()MetaServiceProxy.alterCluster() while sink callers hold the table read lock. This is covered by the existing lock-held external-work thread.
  • Lifecycle and parallel paths: Normal insert with legacy distribution can still reach the snapshot before auto-start, as covered by the existing normal-insert thread. Transactional VALUES and cloud broker load retain the same pre-wake gap covered by the existing parallel-caller thread. Group commit intentionally bypasses location initialization; no other distinct caller was found.
  • Configuration: No configuration item or dynamic-reload behavior is added.
  • Compatibility: No function symbol, storage format, persisted state, or FE/BE thrift field changes. Existing V1/V2 fake-tablet and real-location replacement behavior remains intact.
  • Conditions and error handling: Missing context and empty candidates fail explicitly. Production insert/load call chains establish the correct thread-local context and selected group; no separate stale/wrong-context bug was substantiated.
  • Tests and results: The new tests are isolated and cover the two local fixes. Live FE UT, compile, CheckStyle, and cloud regression checks pass. The live FE coverage check is failing, but its TeamCity details were not accessible. No local build or tests were run because this review runner's contract forbids them.
  • Observability: No new critical state requires additional metrics; existing errors/logging cover the local selection failure, though the lifecycle failure itself must still be fixed.
  • Transactions, persistence, and data writes: This patch changes planning only and introduces no journal or transaction-state format. The current head removed the temporary auto-start wait that caused the earlier stale-table/load-job cleanup defects, so those particular older threads are not new blockers on this head.
  • FE/BE variable propagation: No new cross-process variable is introduced.
  • Performance: The ordinary physical-group path uses a copied cached snapshot and introduces no material hot-path regression. Virtual-group failover is the lock-held external-I/O exception noted above.
  • Other issues: The previous cross-index aliasing issue is fixed. No additional correctness, memory-safety, security, or rolling-upgrade issue was substantiated.

No additional user review focus was provided. One complete convergence round was performed: both normal full-review agents and the separate risk-focused agent returned NO_NEW_VALUABLE_FINDINGS against the same current ledger and live existing-comment set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants