Skip to content

[fix](regression) Wait for completed profiles in RF pruning tests#64392

Merged
BiteTheDDDDt merged 8 commits into
apache:masterfrom
BiteTheDDDDt:codex/profile-completion-state
Jun 16, 2026
Merged

[fix](regression) Wait for completed profiles in RF pruning tests#64392
BiteTheDDDDt merged 8 commits into
apache:masterfrom
BiteTheDDDDt:codex/profile-completion-state

Conversation

@BiteTheDDDDt

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: Runtime-filter partition-pruning regression tests read FE query profiles immediately after query completion. Query completion does not guarantee that asynchronous BE profile reports have been merged, so the tests can see RF pruning counters before their final values and fail with zero partition counters. This change exposes a profile completion state in the query profile REST list based on ExecutionProfile.isCompleted(), persists the terminal state before profile spill, and updates the RF pruning profile pollers to wait for COMPLETE before reading counter values.

Release note

None

Check List (For Author)

  • Test: Manual test
    • Ran git diff --check.
    • Tried ./run-fe-ut.sh --run org.apache.doris.common.profile.ProfileManagerTest#getProfileCompletionStateInQueryList, but fe-core compilation failed before running the test because generated parser/proto classes are inconsistent with Java sources.
  • Behavior changed: Yes. /rest/v1/query_profile rows include Profile Completion State.
  • Does this need documentation: No

### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: Runtime-filter partition-pruning regression tests read FE query profiles immediately after query completion. Query completion does not guarantee that asynchronous BE profile reports have been merged, so the tests can see RF pruning counters before their final values and fail with zero partition counters. This change exposes a profile completion state in the query profile REST list based on ExecutionProfile.isCompleted(), persists the terminal state before profile spill, and updates the RF pruning profile pollers to wait for COMPLETE before reading counter values.

### Release note

None

### Check List (For Author)

- Test: Manual test

    - Ran git diff --check.

    - Tried ./run-fe-ut.sh --run org.apache.doris.common.profile.ProfileManagerTest#getProfileCompletionStateInQueryList, but fe-core compilation failed before running the test because generated parser/proto classes are inconsistent with Java sources.

- Behavior changed: Yes. /rest/v1/query_profile rows include Profile Completion State.

- Does this need documentation: No
Copilot AI review requested due to automatic review settings June 11, 2026 02:50
@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?

@BiteTheDDDDt

Copy link
Copy Markdown
Contributor Author

/review

Copilot AI 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.

Pull request overview

This PR stabilizes runtime-filter partition-pruning regression tests by ensuring they only read query profile counters after the profile has fully finished collecting BE reports. It also exposes and persists a new “Profile Completion State” field in the FE query-profile REST listing to support this polling behavior.

Changes:

  • Add “Profile Completion State” to /rest/v1/query_profile rows and compute it from Profile/ExecutionProfile.isCompleted().
  • Persist a terminal completion state into the stored profile metadata before spilling profiles to disk.
  • Update RF pruning regression suites to poll until the profile state is COMPLETE before reading counter values.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
regression-test/suites/query_p0/runtime_filter/rf_partition_pruning.groovy Waits for profile completion state COMPLETE before fetching profile text/counters.
regression-test/suites/query_p0/runtime_filter/rf_partition_pruning_type_matrix.groovy Same completion-state polling to avoid reading partial counters.
fe/fe-core/src/test/java/org/apache/doris/common/profile/ProfileManagerTest.java Adds UT coverage asserting completion-state values in query list output.
fe/fe-core/src/main/java/org/apache/doris/httpv2/controller/QueryProfileController.java Appends the new completion-state column to /rest/v1/query_profile output.
fe/fe-core/src/main/java/org/apache/doris/common/profile/SummaryProfile.java Introduces completion-state constants and a setter for storage metadata.
fe/fe-core/src/main/java/org/apache/doris/common/profile/ProfileManager.java Supports dynamically providing completion state when building query list rows.
fe/fe-core/src/main/java/org/apache/doris/common/profile/Profile.java Implements completion-state computation and persists terminal state on spill.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread fe/fe-core/src/main/java/org/apache/doris/common/profile/Profile.java Outdated

@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.

Review opinion: no blocking issues found.

Critical checkpoint conclusions:

  • Goal/test proof: The PR addresses the stated RF partition-pruning profile race by exposing a query-list completion state and making the affected regression pollers wait for COMPLETE before reading counters. A FE unit test covers RUNNING, COLLECTING, and COMPLETE list states; the two target regression suites are updated.
  • Scope/focus: The implementation is small and focused on profile list metadata plus the two flaky pollers.
  • Concurrency/lifecycle: The change derives state from existing Profile/ExecutionProfile lifecycle markers and does not add locks or heavy work under new locks. I checked the Coordinator/profile-IO interaction and did not find a new race beyond existing profile-manager synchronization patterns.
  • Config changes: None.
  • Compatibility/storage: The v1 /rest/v1/query_profile response gains one extra row-map key. Stored profiles persist the terminal state in SummaryProfile before execution profiles are released; older stored profiles fall back to UNKNOWN. No EditLog or query-data format compatibility concern found.
  • Parallel paths: The changed v1 path is the one used by ProfileAction in these regression tests; v2 manager/query and SHOW profile schemas are not changed.
  • Conditional checks: The new state distinctions are straightforward and tied to query-finished plus ExecutionProfile.isCompleted().
  • Test coverage/results: No .out file is required for these changes. I ran git diff --check only; I did not run FE UT or regression suites in this review environment.
  • Observability: No additional logs or metrics appear necessary for this narrow metadata exposure.
  • Transactions/data writes/FE-BE variables: No transaction path, user data write path, or FE-BE variable propagation is involved.
  • Performance: The query list now checks completion state per listed profile; this is bounded by existing profile-list size and acceptable for this endpoint.
  • Other issues: None found.

Existing inline review context: there were no existing inline review threads to de-duplicate against. User focus: no additional user-provided review focus was present.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@BiteTheDDDDt

Copy link
Copy Markdown
Contributor Author

/review

@BiteTheDDDDt

Copy link
Copy Markdown
Contributor Author

run buildall

@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.

Requesting changes.

Critical checkpoint conclusions:

  • Goal/test: The PR aims to wait RF pruning tests until async BE profile reports are fully merged. The direction is reasonable, and it adds FE/regression coverage, but the current head cannot be accepted because the FE source has a syntax error.
  • User focus: No additional user-provided focus points were present.
  • Scope: The change is mostly focused on FE profile state plus the two RF pruning pollers.
  • Concurrency: This area is explicitly concurrent: servlet/profile-list readers, profile-manager IO/daemon threads, coordinator/load threads, and the profile-write-pool all touch profile state. The existing ArrayList concern was addressed, but the new completion check still reaches an unlocked RuntimeProfile.childList read while report merging mutates it.
  • Lifecycle/persistence: Persisting the terminal state in SummaryProfile before profile spill is the right lifecycle point; older stored profiles fall back to UNKNOWN. No new static lifecycle issue found.
  • Config/compatibility: No new config, FE-BE thrift field, storage format, or rolling-upgrade-sensitive protocol change found. The REST list adds an intended new column.
  • Parallel paths: /rest/v1/query_profile is updated for the new state. SHOW query/load profile paths do not expose this new column, which seems acceptable for the stated regression-test goal.
  • Data correctness/transactions: No query data visibility, transaction, version, or delete-bitmap behavior is changed.
  • Testing: I attempted ./run-fe-ut.sh --run org.apache.doris.common.profile.ProfileManagerTest#getProfileCompletionStateInQueryList, but this runner failed before Java compilation because thirdparty/installed/bin/protoc is missing. git diff --check passed for the changed files.
  • Observability/performance: No additional metric/log requirement found; the on-demand state scan is bounded by profile/execution-profile counts, but it needs the concurrency fix noted inline.

BiteTheDDDDt and others added 2 commits June 11, 2026 13:32
…le.java

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
### What problem does this PR solve?

Issue Number: None

Related PR: apache#64392

Problem Summary: Profile completion state queries inspect execution profiles while backend profile reports may still append fragment child profiles on the profile write pool. Checking the child list without holding RuntimeProfile's child lock can race with addChild. Move the completion check into RuntimeProfile so the child list size and done/cancel flags are read under the existing read lock.

### Release note

None

### Check List (For Author)

- Test: Manual test
    - git diff --check
    - Attempted ./run-fe-ut.sh --run org.apache.doris.common.profile.ProfileManagerTest#getProfileCompletionStateInQueryList, but FE compilation failed before test execution due existing generated parser/proto mismatches unrelated to this change.
- Behavior changed: No
- Does this need documentation: No
@BiteTheDDDDt

Copy link
Copy Markdown
Contributor Author

/review

@BiteTheDDDDt

Copy link
Copy Markdown
Contributor Author

run buildall

@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.

Review result: request changes. I found one new correctness issue in the completion-state predicate: it can report COMPLETE before every backend has reported, so the RF pruning tests can still read incomplete counters.

Critical checkpoints:

  • Goal/test: The goal is to wait for fully merged asynchronous BE profiles before reading RF counters. The current code does not fully accomplish that because completion is based on child profile node count, not distinct backend reports. The new FE unit test covers RUNNING/COLLECTING/COMPLETE states, but it does not cover a multi-BE fragment where one BE contributes multiple child profiles.
  • Scope/focus: The change is otherwise focused on the REST profile list, profile persistence, and two regression pollers.
  • Concurrency: The latest head moves child-list reads under RuntimeProfile.childLock, addressing the already-known child-list race. I did not add duplicate comments for the existing review threads.
  • Lifecycle/persistence: Persisting the terminal state before spill and returning UNKNOWN for older stored profiles looks reasonable.
  • Config/compatibility: No new config or incompatible wire/storage format change found; the REST response adds a column.
  • Parallel paths: SHOW/manager profile paths are not updated with the new column, but the PR's stated consumer is /rest/v1/query_profile, so I did not treat that as blocking.
  • Tests: Missing coverage for the multi-backend/multiple-child-profile case described inline.
  • Observability/performance/transactions: No additional issue found.
  • User focus: No additional user-provided review focus.

Comment thread fe/fe-core/src/main/java/org/apache/doris/common/profile/RuntimeProfile.java Outdated
@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29493 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 77d612a81ce86a308ea48a1365e452806e216b55, 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	17586	4105	4040	4040
q2	q3	10787	1459	865	865
q4	4742	489	354	354
q5	7968	888	594	594
q6	221	181	144	144
q7	833	858	657	657
q8	10013	1579	1672	1579
q9	6266	4593	4529	4529
q10	6848	1830	1526	1526
q11	461	284	253	253
q12	636	435	317	317
q13	18112	3404	2791	2791
q14	269	264	238	238
q15	q16	847	784	716	716
q17	1019	1031	989	989
q18	6833	5800	5556	5556
q19	1496	1256	1116	1116
q20	533	405	272	272
q21	6135	2804	2610	2610
q22	464	389	347	347
Total cold run time: 102069 ms
Total hot run time: 29493 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	4945	4810	4904	4810
q2	q3	4859	5240	4672	4672
q4	2168	2265	1431	1431
q5	4902	4815	4882	4815
q6	249	187	143	143
q7	1871	1794	1548	1548
q8	2444	2016	1947	1947
q9	7537	7455	7526	7455
q10	4746	4721	4236	4236
q11	554	392	356	356
q12	750	759	545	545
q13	2998	3370	2841	2841
q14	274	282	260	260
q15	q16	680	705	622	622
q17	1306	1283	1269	1269
q18	7405	6833	6731	6731
q19	1119	1148	1132	1132
q20	2251	2237	1975	1975
q21	5368	4671	4493	4493
q22	528	482	398	398
Total cold run time: 56954 ms
Total hot run time: 51679 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 169641 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 77d612a81ce86a308ea48a1365e452806e216b55, data reload: false

query5	4320	637	476	476
query6	422	186	166	166
query7	4837	566	286	286
query8	357	219	200	200
query9	8784	4110	4102	4102
query10	466	306	265	265
query11	5938	2357	2165	2165
query12	166	103	98	98
query13	1254	622	443	443
query14	6396	5444	5100	5100
query14_1	4408	4442	4376	4376
query15	206	198	176	176
query16	1046	462	403	403
query17	1116	730	591	591
query18	2600	485	354	354
query19	208	195	146	146
query20	117	109	108	108
query21	219	141	118	118
query22	13759	13747	13467	13467
query23	17401	16653	16376	16376
query23_1	16426	16412	16404	16404
query24	7570	1797	1325	1325
query24_1	1319	1304	1295	1295
query25	567	446	412	412
query26	1305	314	170	170
query27	2678	588	338	338
query28	4432	2039	2036	2036
query29	1082	633	491	491
query30	313	246	200	200
query31	1139	1086	973	973
query32	116	64	60	60
query33	522	330	259	259
query34	1186	1143	632	632
query35	755	809	730	730
query36	1382	1378	1214	1214
query37	147	103	89	89
query38	3222	3183	3057	3057
query39	941	935	898	898
query39_1	889	883	886	883
query40	223	123	99	99
query41	65	61	59	59
query42	96	92	95	92
query43	315	325	280	280
query44	
query45	201	188	182	182
query46	1086	1219	734	734
query47	2355	2315	2171	2171
query48	395	412	300	300
query49	614	459	348	348
query50	988	348	259	259
query51	4386	4363	4303	4303
query52	89	94	79	79
query53	255	257	192	192
query54	260	233	205	205
query55	78	74	71	71
query56	231	222	237	222
query57	1446	1396	1332	1332
query58	251	215	206	206
query59	1570	1657	1427	1427
query60	282	247	232	232
query61	151	149	153	149
query62	705	650	590	590
query63	234	190	184	184
query64	2559	766	591	591
query65	
query66	1773	454	336	336
query67	29816	29779	29611	29611
query68	
query69	437	296	257	257
query70	972	926	912	912
query71	308	260	211	211
query72	2805	2611	2391	2391
query73	871	766	445	445
query74	5147	5002	4801	4801
query75	2641	2602	2236	2236
query76	2339	1171	763	763
query77	343	373	288	288
query78	12334	12592	11942	11942
query79	1434	1029	753	753
query80	1293	482	401	401
query81	521	278	244	244
query82	595	158	118	118
query83	328	278	245	245
query84	
query85	880	483	405	405
query86	420	300	289	289
query87	3417	3359	3207	3207
query88	3671	2749	2727	2727
query89	422	387	332	332
query90	1929	176	186	176
query91	172	160	134	134
query92	66	60	57	57
query93	1593	1474	909	909
query94	734	358	290	290
query95	663	462	338	338
query96	990	778	339	339
query97	2707	2724	2543	2543
query98	212	208	205	205
query99	1147	1196	1073	1073
Total cold run time: 252277 ms
Total hot run time: 169641 ms

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 36.17% (34/94) 🎉
Increment coverage report
Complete coverage report

BiteTheDDDDt added 2 commits June 13, 2026 18:21
### What problem does this PR solve?

Issue Number: None

Related PR: apache#64392

Problem Summary: Profile text generated before storage did not refresh the newly added profile completion state in the summary profile. When the same profile was written to storage, the storage path persisted the completion state and subsequent reads printed an extra summary line, making ProfilePersistentTest compare different strings. Refresh the display completion state before pretty-printing the summary, while keeping the existing storage-specific state used when persisting incomplete finished profiles.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-fe-ut.sh --run org.apache.doris.common.profile.ProfilePersistentTest#testGetOnStorageProfile
    - ./run-fe-ut.sh --run org.apache.doris.common.profile.ProfileManagerTest#getProfileCompletionStateInQueryList
    - git diff --check
- Behavior changed: No
- Does this need documentation: No
### What problem does this PR solve?

Issue Number: None

Related PR: apache#64392

Problem Summary: Profile completion state checked fragment RuntimeProfile child-node count against the expected backend count. A single backend report can add multiple child profile nodes, including a fragment-level profile and pipeline profiles, so the state could become COMPLETE before every backend report had been merged. Track the distinct backend addresses whose done reports have been merged for each fragment and use that count for completion. Add unit coverage for a two-backend fragment where the first backend contributes multiple profile nodes.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-fe-ut.sh --run org.apache.doris.common.profile.ProfileManagerTest#profileCompletionStateWaitsForDistinctBackendReports
    - ./run-fe-ut.sh --run org.apache.doris.common.profile.ProfileManagerTest#getProfileCompletionStateInQueryList
    - git diff --check
- Behavior changed: No
- Does this need documentation: No
@BiteTheDDDDt

Copy link
Copy Markdown
Contributor Author

run buildall

@BiteTheDDDDt

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.

No additional blocking findings from this pass. I reviewed the current head against the existing inline threads and did not re-raise the already-known compile/concurrency/completion-count concerns; the latest code addresses those by using index-based execution profile traversal and distinct done-backend tracking.

Checkpoint conclusions:

  • Goal and tests: The PR goal is to let RF pruning regression pollers wait until async BE profile reports are merged. The implementation exposes a completion state and adds focused FE unit coverage plus regression poller updates. I could not rerun FE UT in this runner because thirdparty/installed/bin/protoc is missing, per FE build prerequisites.
  • Scope: The change is focused on profile completion state and the two RF pruning pollers.
  • Concurrency: The relevant concurrency is BE report merging on profile-write-pool versus REST/profile-list reads. The new done-backend set is protected by multiBeProfileLock and completion no longer reads RuntimeProfile childList directly. ProfileManager read/write locking still protects storage release versus list reads.
  • Lifecycle/storage: Stored profiles persist COMPLETE or INCOMPLETE before memory release; old stored profiles without the new field fall back to UNKNOWN.
  • Compatibility/API: /rest/v1/query_profile gains one user-visible column. Existing row construction is dynamic, and the changed regression helper reads it by name.
  • Parallel paths: Display and storage paths both refresh the state; realtime profile fetch remains separate and does not mark completion until BE done reports are merged.
  • Tests/results: New FE unit tests cover RUNNING/COLLECTING/COMPLETE and the distinct-backend case. Regression helpers now wait for COMPLETE and counters. No generated .out files are involved.
  • Observability/performance: No new heavy logging or hot-path overhead found; the extra profile-list work is bounded by current profile rows and existing execution profile metadata.

User focus: .code-review.Ogvn8v/review_focus.txt contained no additional focus points, so no extra focus-specific issue was found.

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 28824 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 916e6304cae6fbe1e7043e2965d49dd9a798d96f, 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	17662	4122	4083	4083
q2	q3	10770	1392	806	806
q4	4682	471	336	336
q5	7546	865	572	572
q6	182	175	140	140
q7	787	820	622	622
q8	9715	1572	1576	1572
q9	6294	4447	4463	4447
q10	6830	1818	1503	1503
q11	438	272	248	248
q12	639	424	286	286
q13	18102	3359	2750	2750
q14	268	253	238	238
q15	q16	818	771	707	707
q17	1009	921	973	921
q18	6934	5668	5517	5517
q19	1304	1295	1105	1105
q20	540	406	262	262
q21	5829	2561	2403	2403
q22	430	358	306	306
Total cold run time: 100779 ms
Total hot run time: 28824 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	4473	4418	4380	4380
q2	q3	4528	4975	4297	4297
q4	2117	2183	1366	1366
q5	4473	4338	4361	4338
q6	223	175	132	132
q7	1733	1721	1836	1721
q8	2634	2383	2245	2245
q9	7950	7967	7928	7928
q10	4807	4793	4349	4349
q11	594	431	406	406
q12	739	764	550	550
q13	3480	3717	2868	2868
q14	321	319	283	283
q15	q16	723	777	695	695
q17	1412	1382	1387	1382
q18	8143	7261	7382	7261
q19	1162	1158	1204	1158
q20	2235	2243	1928	1928
q21	5314	4615	4617	4615
q22	522	470	394	394
Total cold run time: 57583 ms
Total hot run time: 52296 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 168111 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 916e6304cae6fbe1e7043e2965d49dd9a798d96f, data reload: false

query5	4324	618	470	470
query6	435	184	175	175
query7	4807	571	296	296
query8	354	211	198	198
query9	8785	4074	4045	4045
query10	443	302	240	240
query11	5913	2358	2185	2185
query12	149	97	96	96
query13	1253	636	407	407
query14	6357	5428	5029	5029
query14_1	4323	4358	4362	4358
query15	200	197	171	171
query16	991	434	436	434
query17	1083	684	557	557
query18	2446	470	329	329
query19	189	175	135	135
query20	107	103	101	101
query21	215	135	115	115
query22	13760	13640	13428	13428
query23	17307	16441	16102	16102
query23_1	16301	16190	16184	16184
query24	7525	1753	1274	1274
query24_1	1305	1292	1338	1292
query25	568	472	388	388
query26	1317	321	163	163
query27	2660	526	333	333
query28	4473	2059	2044	2044
query29	1105	611	505	505
query30	318	240	199	199
query31	1119	1093	966	966
query32	111	61	62	61
query33	536	327	262	262
query34	1168	1131	644	644
query35	769	773	694	694
query36	1337	1398	1245	1245
query37	164	109	93	93
query38	3207	3146	3066	3066
query39	921	932	885	885
query39_1	867	886	901	886
query40	222	127	108	108
query41	79	77	80	77
query42	99	93	95	93
query43	313	317	279	279
query44	
query45	199	187	175	175
query46	1075	1215	775	775
query47	2374	2335	2274	2274
query48	409	417	286	286
query49	638	476	392	392
query50	1013	363	255	255
query51	4370	4246	4208	4208
query52	91	89	77	77
query53	246	270	195	195
query54	280	228	214	214
query55	82	76	71	71
query56	250	228	240	228
query57	1415	1402	1344	1344
query58	234	217	227	217
query59	1569	1692	1411	1411
query60	289	264	236	236
query61	171	173	183	173
query62	687	651	582	582
query63	223	179	190	179
query64	2535	742	588	588
query65	
query66	1814	454	342	342
query67	29841	29586	29428	29428
query68	
query69	418	291	257	257
query70	975	970	924	924
query71	309	224	206	206
query72	2849	2562	2358	2358
query73	809	755	422	422
query74	5142	4944	4760	4760
query75	2634	2535	2239	2239
query76	2341	1184	774	774
query77	345	352	288	288
query78	12392	12395	11857	11857
query79	1414	1066	763	763
query80	1278	458	387	387
query81	529	277	242	242
query82	585	159	117	117
query83	348	274	247	247
query84	
query85	901	506	405	405
query86	419	293	285	285
query87	3364	3320	3258	3258
query88	3604	2720	2736	2720
query89	458	382	327	327
query90	1936	180	178	178
query91	168	158	129	129
query92	62	58	50	50
query93	1494	1456	899	899
query94	716	344	311	311
query95	670	367	336	336
query96	1050	857	355	355
query97	2679	2667	2539	2539
query98	218	208	201	201
query99	1114	1175	1049	1049
Total cold run time: 251268 ms
Total hot run time: 168111 ms

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 71.43% (35/49) 🎉
Increment coverage report
Complete coverage report

### What problem does this PR solve?

Issue Number: None

Related PR: apache#64392

Problem Summary: RF partition-pruning regression tests waited for Profile Completion State to become COMPLETE before reading the profile detail. Query completion and final profile merging are asynchronous, so the profile row can be visible while the completion state is still COLLECTING. In that window the poller returned an empty profile and failed with "Profile not found" even though the profile detail may already be readable. This change keeps the latest non-empty profile detail while still waiting for COMPLETE plus the required RF pruning counters before exiting early.

### Release note

None

### Check List (For Author)

- Test: Manual test

    - Ran git diff --check.

    - Tried ./run-regression-test.sh --run -d query_p0/runtime_filter -s rf_partition_pruning; local validation could not reach a Doris FE on 127.0.0.1:9030 and failed with Connection refused before suite assertions.

- Behavior changed: No

- Does this need documentation: No
@BiteTheDDDDt

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 28625 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 774615ddad41cb229464ce27ed7b67f3087d057b, 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	17971	4072	3957	3957
q2	q3	10804	1349	771	771
q4	4678	474	336	336
q5	7537	838	580	580
q6	174	167	137	137
q7	770	809	633	633
q8	9349	1510	1628	1510
q9	5769	4429	4391	4391
q10	6723	1805	1520	1520
q11	427	268	242	242
q12	625	426	280	280
q13	18178	3394	2784	2784
q14	262	257	238	238
q15	q16	819	770	708	708
q17	1003	992	1000	992
q18	6877	5709	5514	5514
q19	1354	1291	1057	1057
q20	503	410	259	259
q21	5884	2507	2416	2416
q22	427	349	300	300
Total cold run time: 100134 ms
Total hot run time: 28625 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	4286	4424	4210	4210
q2	q3	4525	4915	4351	4351
q4	2039	2156	1359	1359
q5	4367	4270	4298	4270
q6	224	173	126	126
q7	1717	1604	1421	1421
q8	2864	2295	2089	2089
q9	8106	8075	8120	8075
q10	4727	4705	4296	4296
q11	576	397	361	361
q12	738	747	538	538
q13	3239	3607	2925	2925
q14	288	302	269	269
q15	q16	710	718	642	642
q17	1332	1327	1292	1292
q18	7877	7274	7291	7274
q19	1131	1148	1140	1140
q20	2232	2220	1928	1928
q21	5201	4513	4343	4343
q22	518	457	423	423
Total cold run time: 56697 ms
Total hot run time: 51332 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 168159 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 774615ddad41cb229464ce27ed7b67f3087d057b, data reload: false

query5	4324	630	505	505
query6	430	185	174	174
query7	4849	530	312	312
query8	360	214	201	201
query9	8738	3973	4011	3973
query10	444	311	256	256
query11	5965	2351	2126	2126
query12	163	99	95	95
query13	1244	633	405	405
query14	6323	5327	4992	4992
query14_1	4366	4354	4303	4303
query15	197	194	174	174
query16	1010	443	423	423
query17	1096	684	556	556
query18	2438	456	331	331
query19	194	176	146	146
query20	113	101	106	101
query21	210	135	116	116
query22	13682	13569	13412	13412
query23	17195	16447	16088	16088
query23_1	16282	16275	16062	16062
query24	7705	1735	1282	1282
query24_1	1295	1272	1296	1272
query25	543	434	381	381
query26	1306	314	162	162
query27	2740	574	349	349
query28	4514	2008	2007	2007
query29	1062	611	454	454
query30	313	233	193	193
query31	1104	1065	946	946
query32	107	61	59	59
query33	523	309	245	245
query34	1179	1165	649	649
query35	743	768	668	668
query36	1391	1389	1205	1205
query37	155	100	87	87
query38	3191	3103	3027	3027
query39	923	924	887	887
query39_1	904	894	853	853
query40	219	124	104	104
query41	69	69	66	66
query42	97	104	98	98
query43	319	323	277	277
query44	
query45	197	188	178	178
query46	1036	1185	733	733
query47	2385	2412	2256	2256
query48	395	390	293	293
query49	648	488	369	369
query50	1041	354	263	263
query51	4325	4375	4267	4267
query52	96	96	81	81
query53	257	281	192	192
query54	285	231	220	220
query55	81	78	71	71
query56	287	216	205	205
query57	1418	1433	1319	1319
query58	239	211	210	210
query59	1562	1661	1408	1408
query60	284	238	209	209
query61	154	143	149	143
query62	697	640	585	585
query63	224	188	194	188
query64	2546	759	595	595
query65	
query66	1823	454	327	327
query67	29537	29597	29394	29394
query68	
query69	414	302	257	257
query70	997	935	934	934
query71	304	220	206	206
query72	2948	2531	2471	2471
query73	873	812	427	427
query74	5103	4908	4765	4765
query75	2647	2594	2253	2253
query76	2313	1159	774	774
query77	361	371	297	297
query78	12406	12385	11766	11766
query79	1355	1128	759	759
query80	628	489	413	413
query81	460	283	244	244
query82	568	164	120	120
query83	360	286	255	255
query84	
query85	939	574	411	411
query86	389	302	285	285
query87	3359	3310	3220	3220
query88	3568	2738	2708	2708
query89	422	386	334	334
query90	1966	178	166	166
query91	170	161	136	136
query92	61	65	56	56
query93	1568	1392	901	901
query94	527	356	315	315
query95	676	374	360	360
query96	1042	782	341	341
query97	2686	2673	2535	2535
query98	208	205	200	200
query99	1151	1169	1025	1025
Total cold run time: 250402 ms
Total hot run time: 168159 ms

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 71.43% (35/49) 🎉
Increment coverage report
Complete coverage report

@BiteTheDDDDt

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.

I found two blocking correctness issues in the completion-state implementation.

Critical checkpoint conclusions:

  • Goal: partially met. The PR adds a REST/list completion state and updates the RF pruning pollers, but the state is wrong for the Nereids execution path and can become inconsistent with the merged profile detail.
  • Scope: the change is focused on profile completion and the affected regression tests.
  • Concurrency: this code is concurrency-sensitive. BE profile reports and real-time profile fetches are merged asynchronously on profile-write-pool; one race can leave the list state as COMPLETE while the merged detail profile has been overwritten by an older non-final report.
  • Lifecycle/storage: spilled profiles persist the new terminal state, but with the missed Nereids backend-count path they can persist INCOMPLETE after all reports arrived.
  • Parallel code paths: classic Coordinator records fragment/backend expectations, but Nereids PipelineExecutionTask construction does not, so the parallel path is not covered.
  • Tests: the added unit tests cover direct ExecutionProfile use, but they do not cover the Nereids execution-task path or real-time profile fetch racing after a final done report. I ran git diff --check FETCH_HEAD HEAD; I did not run FE/regression tests in this review pass.
  • Config/compatibility/security/transactions: no new config, security, transaction, or wire/storage-format compatibility issue found beyond old stored profiles returning UNKNOWN as designed.
  • Observability/performance: no separate observability issue found; the Nereids bug can make the updated pollers wait their full timeout repeatedly.

User focus: no additional user-provided review focus was supplied.

### What problem does this PR solve?

Issue Number: None

Related PR: apache#64392

Problem Summary: Nereids pipeline task construction did not register fragment/backend expectations in ExecutionProfile, so completed Nereids query profiles could remain in collecting or incomplete state. A later realtime non-final profile fetch could also overwrite the final done backend profile after completion. This change registers Nereids fragment/backend tasks in ExecutionProfile and rejects stale non-final backend profile updates after the final profile for that fragment/backend is recorded.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-fe-ut.sh --run org.apache.doris.common.profile.ProfileManagerTest#completedBackendProfileRejectsLaterRealtimeProfile
    - ./run-fe-ut.sh --run org.apache.doris.qe.runtime.PipelineExecutionTaskBuilderTest#buildSingleFragmentPipelineTaskRegistersBackendWithExecutionProfile
    - git diff --check
- Behavior changed: No
- Does this need documentation: No
@BiteTheDDDDt

Copy link
Copy Markdown
Contributor Author

/review

@BiteTheDDDDt

Copy link
Copy Markdown
Contributor Author

run buildall

@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.

Review result: I found no additional blocking issues on the current head after reading the existing inline review threads. The current changes appear to address the known profile-completion concerns by tracking distinct done backends, rejecting stale non-done real-time profile updates after a backend has reported done, and registering expected backends for the Nereids task-builder path.

Critical checkpoint conclusions:

  • Goal and tests: The PR adds a live/persisted profile completion state and updates RF pruning pollers to wait for COMPLETE. Unit coverage was added for running/collecting/complete states, distinct backend reports, stale real-time updates, and Nereids backend registration. Regression pollers were updated accordingly.
  • Scope: The change is focused on FE profile metadata/completion tracking and the affected RF regression tests.
  • Concurrency: This path is concurrent across REST profile reads, profile-write-pool BE report merges, real-time profile fetches, and profile IO. The done-backend set and per-BE profile source are now updated under the same multiBeProfileLock, and expected backend counts are populated before fragment RPCs are sent in both classic and Nereids paths. I did not find a new deadlock or stale-overwrite issue distinct from the already-known review context.
  • Lifecycle and persistence: Stored profiles now persist COMPLETE or INCOMPLETE before memory release; older stored profiles without the field fall back to UNKNOWN. No special static/global lifecycle issue found.
  • Config and compatibility: No config item was added. The summary field is additive and does not introduce an FE-BE protocol/storage-format incompatibility requiring rolling-upgrade handling.
  • Parallel code paths: Classic Coordinator and Nereids pipeline task construction now both register expected backend counts.
  • Conditional checks: The expectedBackendNum == 0 branch preserves “not complete until expected backends are known”; I did not find another similar path missed by this PR.
  • Test results: git diff --check passed. I attempted ./run-fe-ut.sh --run org.apache.doris.common.profile.ProfileManagerTest,org.apache.doris.qe.runtime.PipelineExecutionTaskBuilderTest, but the runner checkout is missing thirdparty/installed/bin/protoc, so generated-source failed before Maven could run the tests.
  • Observability: Existing profile/report logs look sufficient for this change; no new metric seems necessary.
  • Transactions/data writes: No transaction visibility, data-write, or EditLog behavior is touched.
  • Performance: The added checks are lightweight and off the query execution hot path; no obvious new performance issue found.

User focus: no additional user-provided focus points were supplied.

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 88.71% (55/62) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29230 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 72a9d65c0ec36e20b76a93b465736dbebc5ed54f, 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	17639	4172	4153	4153
q2	q3	10784	1380	805	805
q4	4688	480	342	342
q5	7542	892	572	572
q6	178	173	140	140
q7	789	830	649	649
q8	9328	1732	1591	1591
q9	5829	4556	4503	4503
q10	6810	1826	1545	1545
q11	426	270	254	254
q12	632	428	284	284
q13	18109	3367	2728	2728
q14	273	257	245	245
q15	q16	809	775	702	702
q17	998	945	920	920
q18	7022	5959	5702	5702
q19	1312	1260	1156	1156
q20	518	409	254	254
q21	5855	2614	2379	2379
q22	429	364	306	306
Total cold run time: 99970 ms
Total hot run time: 29230 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	4389	4333	4374	4333
q2	q3	4489	4943	4351	4351
q4	2094	2223	1409	1409
q5	4489	4313	4362	4313
q6	228	173	129	129
q7	1749	1640	1949	1640
q8	2681	2340	2341	2340
q9	8230	8492	8027	8027
q10	4805	4718	4297	4297
q11	604	430	391	391
q12	740	763	554	554
q13	3294	3691	3091	3091
q14	297	307	271	271
q15	q16	722	746	640	640
q17	1398	1371	1471	1371
q18	8087	7406	7304	7304
q19	1242	1132	1117	1117
q20	2224	2222	1960	1960
q21	5369	4679	4469	4469
q22	517	453	421	421
Total cold run time: 57648 ms
Total hot run time: 52428 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 168575 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 72a9d65c0ec36e20b76a93b465736dbebc5ed54f, data reload: false

query5	4326	615	470	470
query6	441	197	173	173
query7	4889	578	285	285
query8	360	217	200	200
query9	8737	4016	3991	3991
query10	436	307	262	262
query11	5913	2418	2125	2125
query12	157	99	98	98
query13	1258	620	442	442
query14	6310	5360	5056	5056
query14_1	4352	4359	4355	4355
query15	199	190	170	170
query16	987	445	433	433
query17	910	673	554	554
query18	2416	470	332	332
query19	195	181	139	139
query20	116	103	103	103
query21	217	133	110	110
query22	13659	13556	13379	13379
query23	17344	16536	16127	16127
query23_1	16251	16343	16319	16319
query24	7543	1739	1316	1316
query24_1	1290	1307	1337	1307
query25	566	456	393	393
query26	1318	318	170	170
query27	2716	511	332	332
query28	4499	2027	2001	2001
query29	1091	630	508	508
query30	308	240	203	203
query31	1126	1073	960	960
query32	108	65	59	59
query33	534	327	266	266
query34	1168	1146	647	647
query35	740	780	677	677
query36	1425	1410	1244	1244
query37	153	105	98	98
query38	3211	3146	3102	3102
query39	929	925	895	895
query39_1	891	891	892	891
query40	223	126	108	108
query41	71	68	67	67
query42	94	97	99	97
query43	323	320	282	282
query44	
query45	194	190	186	186
query46	1093	1210	733	733
query47	2404	2380	2181	2181
query48	379	414	318	318
query49	642	475	356	356
query50	976	369	259	259
query51	4365	4261	4255	4255
query52	90	90	77	77
query53	256	271	189	189
query54	276	228	212	212
query55	81	79	77	77
query56	242	237	240	237
query57	1434	1395	1356	1356
query58	248	228	217	217
query59	1556	1670	1432	1432
query60	302	258	244	244
query61	217	148	148	148
query62	695	653	586	586
query63	225	189	187	187
query64	2521	748	611	611
query65	
query66	1811	454	334	334
query67	29783	29756	29570	29570
query68	
query69	440	294	261	261
query70	923	992	968	968
query71	288	218	211	211
query72	2963	2728	2381	2381
query73	879	763	420	420
query74	5135	4957	4819	4819
query75	2656	2566	2229	2229
query76	2305	1147	768	768
query77	352	363	286	286
query78	12308	12415	11783	11783
query79	1420	1028	784	784
query80	581	458	375	375
query81	457	289	241	241
query82	568	152	119	119
query83	353	286	245	245
query84	
query85	846	507	451	451
query86	366	304	285	285
query87	3405	3325	3154	3154
query88	3596	2720	2719	2719
query89	424	384	332	332
query90	1897	179	178	178
query91	173	161	143	143
query92	65	58	58	58
query93	1432	1409	829	829
query94	534	352	312	312
query95	684	383	339	339
query96	1069	836	356	356
query97	2705	2674	2577	2577
query98	222	212	200	200
query99	1160	1196	1020	1020
Total cold run time: 250261 ms
Total hot run time: 168575 ms

zclllyybb pushed a commit to zclllyybb/doris that referenced this pull request Jun 15, 2026
### What problem does this PR solve?

Issue Number: None

Related PR: apache#64392

Problem Summary: Profile completion state queries inspect execution profiles while backend profile reports may still append fragment child profiles on the profile write pool. Checking the child list without holding RuntimeProfile's child lock can race with addChild. Move the completion check into RuntimeProfile so the child list size and done/cancel flags are read under the existing read lock.

### Release note

None

### Check List (For Author)

- Test: Manual test
    - git diff --check
    - Attempted ./run-fe-ut.sh --run org.apache.doris.common.profile.ProfileManagerTest#getProfileCompletionStateInQueryList, but FE compilation failed before test execution due existing generated parser/proto mismatches unrelated to this change.
- Behavior changed: No
- Does this need documentation: No
zclllyybb pushed a commit to zclllyybb/doris that referenced this pull request Jun 15, 2026
### What problem does this PR solve?

Issue Number: None

Related PR: apache#64392

Problem Summary: Profile text generated before storage did not refresh the newly added profile completion state in the summary profile. When the same profile was written to storage, the storage path persisted the completion state and subsequent reads printed an extra summary line, making ProfilePersistentTest compare different strings. Refresh the display completion state before pretty-printing the summary, while keeping the existing storage-specific state used when persisting incomplete finished profiles.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-fe-ut.sh --run org.apache.doris.common.profile.ProfilePersistentTest#testGetOnStorageProfile
    - ./run-fe-ut.sh --run org.apache.doris.common.profile.ProfileManagerTest#getProfileCompletionStateInQueryList
    - git diff --check
- Behavior changed: No
- Does this need documentation: No
zclllyybb pushed a commit to zclllyybb/doris that referenced this pull request Jun 15, 2026
### What problem does this PR solve?

Issue Number: None

Related PR: apache#64392

Problem Summary: Profile completion state checked fragment RuntimeProfile child-node count against the expected backend count. A single backend report can add multiple child profile nodes, including a fragment-level profile and pipeline profiles, so the state could become COMPLETE before every backend report had been merged. Track the distinct backend addresses whose done reports have been merged for each fragment and use that count for completion. Add unit coverage for a two-backend fragment where the first backend contributes multiple profile nodes.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-fe-ut.sh --run org.apache.doris.common.profile.ProfileManagerTest#profileCompletionStateWaitsForDistinctBackendReports
    - ./run-fe-ut.sh --run org.apache.doris.common.profile.ProfileManagerTest#getProfileCompletionStateInQueryList
    - git diff --check
- Behavior changed: No
- Does this need documentation: No
zclllyybb pushed a commit to zclllyybb/doris that referenced this pull request Jun 15, 2026
### What problem does this PR solve?

Issue Number: None

Related PR: apache#64392

Problem Summary: RF partition-pruning regression tests waited for Profile Completion State to become COMPLETE before reading the profile detail. Query completion and final profile merging are asynchronous, so the profile row can be visible while the completion state is still COLLECTING. In that window the poller returned an empty profile and failed with "Profile not found" even though the profile detail may already be readable. This change keeps the latest non-empty profile detail while still waiting for COMPLETE plus the required RF pruning counters before exiting early.

### Release note

None

### Check List (For Author)

- Test: Manual test

    - Ran git diff --check.

    - Tried ./run-regression-test.sh --run -d query_p0/runtime_filter -s rf_partition_pruning; local validation could not reach a Doris FE on 127.0.0.1:9030 and failed with Connection refused before suite assertions.

- Behavior changed: No

- Does this need documentation: No
zclllyybb pushed a commit to zclllyybb/doris that referenced this pull request Jun 15, 2026
### What problem does this PR solve?

Issue Number: None

Related PR: apache#64392

Problem Summary: Nereids pipeline task construction did not register fragment/backend expectations in ExecutionProfile, so completed Nereids query profiles could remain in collecting or incomplete state. A later realtime non-final profile fetch could also overwrite the final done backend profile after completion. This change registers Nereids fragment/backend tasks in ExecutionProfile and rejects stale non-final backend profile updates after the final profile for that fragment/backend is recorded.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-fe-ut.sh --run org.apache.doris.common.profile.ProfileManagerTest#completedBackendProfileRejectsLaterRealtimeProfile
    - ./run-fe-ut.sh --run org.apache.doris.qe.runtime.PipelineExecutionTaskBuilderTest#buildSingleFragmentPipelineTaskRegistersBackendWithExecutionProfile
    - git diff --check
- Behavior changed: No
- Does this need documentation: No
zclllyybb added a commit that referenced this pull request Jun 15, 2026
…mpt (#64536)

Problem Summary: Automated code review runs relied on the reviewer to
infer which module-specific AGENTS.md files apply to a pull request.
Recent Litefuse traces showed that reviews often skipped ancestor guides
such as the repository root AGENTS.md, fe/AGENTS.md, and
be/test/AGENTS.md even when the changed files made them applicable. This
change fetches the PR changed file list, derives every existing
AGENTS.md file from the changed file ancestor directories, records the
list in the review context, and injects the required guide paths
directly into the first Codex review prompt.

We tested 5 PRs that did not read the AGENTS.md file during previous
pipeline runs, and the new results are as follows:

| Origin PR | Test PR | Run | Litefuse Trace | Result |
|---|---:|---:|---|---|
| #64478 | zclllyybb#36 | `27536249602` |
`d76b77ac4e0d52d96f413b154c9f2571` | Read All |
| #64458 | zclllyybb#37 | `27536258049` |
`8db34388a8379acdcd9e48720f11225f` | Read All |
| #64392 | zclllyybb#38 | `27536266784` |
`a5e37fba03375a9517f7a67e33f70d39` | Read All |
| #64489 | zclllyybb#39 | `27536275680` |
`22ace18d70ece96b0ca7fa73123b62da` | Read All |
| #64419 | zclllyybb#41 | `27538239601` |
`1803c040e4140d61e840e4e1526190e7` | Read All |
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label Jun 16, 2026
@BiteTheDDDDt
BiteTheDDDDt merged commit a0a21f8 into apache:master Jun 16, 2026
31 of 32 checks passed
924060929 added a commit that referenced this pull request Jun 22, 2026
…ster's Profile Completion State

master #64392 already added a profile-completion mechanism (Profile Completion State:
RUNNING/COLLECTING/COMPLETE, wired in Profile.java, tested in ProfileManagerTest). Our
IS_PROFILE_COLLECTION_COMPLETED marker duplicated it (and had no reader), so remove it and
make the profile_plan_tree plugin poll master's 'Profile Completion State: COMPLETE' instead
of a fixed sleep.
924060929 added a commit that referenced this pull request Jun 22, 2026
…file Completion State field

The previous text-regex on /api/profile/text was unverified — master (#64392) exposes the
completion state as a structured field of /rest/v1/query_profile (item['Profile Completion
State'] == 'COMPLETE'), the same way its RF-pruning test polls it. Use ProfileAction.getProfileList()
and match by Profile ID == query id, then fetch the profile text to build the tree.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants