Skip to content

[improvement](executor) unify current query runtime statistics and expose task progress#60567

Merged
yiguolei merged 50 commits intoapache:masterfrom
HYDCP:query_progress
May 10, 2026
Merged

[improvement](executor) unify current query runtime statistics and expose task progress#60567
yiguolei merged 50 commits intoapache:masterfrom
HYDCP:query_progress

Conversation

@wenzhenghu
Copy link
Copy Markdown
Contributor

@wenzhenghu wenzhenghu commented Feb 6, 2026

PR Summary

  • This PR unifies current-query runtime statistics onto the BE -> FE reporting pipeline, replacing the previous ad-hoc RuntimeProfile traversal path, and enriches current_queries with task-level progress plus broader resource metrics.
  • The goal is to make current-query visibility more real-time and consistent with audit statistics while simplifying and consolidating FE proc/REST surfaces.

What It Solves

  • Unifies statistics source: QeProcessorImpl now reads aggregated TQueryStatistics from WorkloadRuntimeStatusMgr instead of relying on the legacy CurrentQueryInfoProvider path.
  • Improves progress observability: introduces process_rows, total_tasks_num, and finished_tasks_num, and exposes computed Progress.
  • Expands runtime metrics coverage: current_queries now includes richer scan/cpu/memory/shuffle/spill/cache counters.
  • Consolidates query views: /current_queries and /current_query_stmts now share the same statistics view; legacy per-query/per-fragment proc drill-down implementation is removed.

Implementation Details

  • Protocol layer:
    • Extends TQueryStatistics with process_rows, finished_tasks_num, and total_tasks_num.
  • BE collection/reporting:
    • Accumulates process_rows in the execution path.
    • Records total_tasks_num at pipeline task graph initialization and increments finished_tasks_num in real time when tasks close.
    • Mirrors task-progress counters into QueryTaskController so counters remain available even after QueryContext teardown.
    • Exports new fields in ResourceContext::to_thrift_query_statistics.
  • FE aggregation/retention:
    • WorkloadRuntimeStatusMgr merges additional fields (including task progress) and refines timeout cleanup: remove query stats only when they are timed out and the query no longer exists in FE.
    • QueryStatisticsItem now carries TQueryStatistics as the unified data carrier for proc/REST.
  • Presentation layer:
    • CurrentQueryStatisticsProcDir adds expanded columns and computes Progress.
    • /rest/v2/manager/query/current_queries in QueryProfileAction now serves the same unified stats view.
    • Removes legacy classes: CurrentQueryInfoProvider, CurrentQuerySqlProcDir, CurrentQueryFragmentProcNode, and CurrentQueryStatementsProcNode.
*************************** 1. row ***************************
                       QueryId: e00b00b1155d4042-98862b60016a768a
                  ConnectionId: 394
                       Catalog: internal
                      Database: wzhtest
                          User: root
                      ExecTime: 20717
                       SqlHash: cf263b08302d8be436c97dd5e6f0d283
                     Statement: INSERT INTO test_query_progress_tb   SELECT DISTINCT k, CONCAT(v, CAST(k AS STRING))   FROM test_query_progress_tb   WHERE k % 2 = 0
                      ScanRows: 45400000 Rows
                     ScanBytes: 2.70 GB
                   ProcessRows: 75598123 Rows
                         CpuMs: 178336
            MaxPeakMemoryBytes: 13.03 GB
        CurrentUsedMemoryBytes: 8.69 GB
               WorkloadGroupId: 1777125330381
              ShuffleSendBytes: 0.00
               ShuffleSendRows: 0 Rows
     ScanBytesFromLocalStorage: 31.48 MB
    ScanBytesFromRemoteStorage: 0.00
 SpillWriteBytesToLocalStorage: 0.00
SpillReadBytesFromLocalStorage: 0.00
           BytesWriteIntoCache: 0.00
                    TotalTasks: 74
                 FinishedTasks: 51
                      Progress: 68%
------------------------
-- first--
QueryId: e2b8c99658a94743-9ebbf0d036d83295
  ConnectionId: 9
  Catalog: hive_test
  Database: tpch100_parquet
  User: root
  ExecTime: 6093
  SqlHash: f8a30e4182d72cce3eff6cb385005b1f
  Statement: select ... from supplier, lineitem l1, orders, nation ... limit 100
  ScanRows: 621466194 Rows
  ScanBytes: 5.37 GB
  ProcessRows: 79079742 Rows
  CpuMs: 31655
  MaxPeakMemoryBytes: 2.32 GB
  CurrentUsedMemoryBytes: 2.18 GB
  WorkloadGroupId: 1777253545394
  ShuffleSendBytes: 0.00
  ShuffleSendRows: 0 Rows
  ScanBytesFromLocalStorage: 0.00
  ScanBytesFromRemoteStorage: 5.37 GB
  SpillWriteBytesToLocalStorage: 0.00
  SpillReadBytesFromLocalStorage: 0.00
  BytesWriteIntoCache: 0.00
  TotalTasks: 138
  FinishedTasks: 49
  Progress: 35%
--second--
  QueryId: e2b8c99658a94743-9ebbf0d036d83295
  ConnectionId: 9
  Catalog: hive_test
  Database: tpch100_parquet
  User: root
  ExecTime: 10807
  SqlHash: f8a30e4182d72cce3eff6cb385005b1f
  Statement: select ... from supplier, lineitem l1, orders, nation ... limit 100
  ScanRows: 1102562592 Rows
  ScanBytes: 9.20 GB
  ProcessRows: 112176670 Rows
  CpuMs: 53808
  MaxPeakMemoryBytes: 3.13 GB
  CurrentUsedMemoryBytes: 2.50 GB
  WorkloadGroupId: 1777253545394
  ShuffleSendBytes: 0.00
  ShuffleSendRows: 0 Rows
  ScanBytesFromLocalStorage: 0.00
  ScanBytesFromRemoteStorage: 9.20 GB
  SpillWriteBytesToLocalStorage: 0.00
  SpillReadBytesFromLocalStorage: 0.00
  BytesWriteIntoCache: 0.00
  TotalTasks: 138
  FinishedTasks: 65
  Progress: 47%

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@Thearas
Copy link
Copy Markdown
Contributor

Thearas commented Feb 6, 2026

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?

@wenzhenghu
Copy link
Copy Markdown
Contributor Author

run buildall

1 similar comment
@wenzhenghu
Copy link
Copy Markdown
Contributor Author

run buildall

@doris-robot
Copy link
Copy Markdown

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

------ Round 1 ----------------------------------
q1	16462	4462	4254	4254
q2	2014	349	262	262
q3	9648	1266	742	742
q4	9854	768	305	305
q5	7498	2205	1909	1909
q6	191	180	146	146
q7	852	772	599	599
q8	9183	1345	1140	1140
q9	4558	4647	4570	4570
q10	6776	1943	1518	1518
q11	501	316	303	303
q12	337	379	220	220
q13	17584	4049	3244	3244
q14	241	230	221	221
q15	884	816	803	803
q16	693	665	620	620
q17	692	761	574	574
q18	6633	5792	5672	5672
q19	1093	988	609	609
q20	515	492	382	382
q21	2543	1824	1753	1753
q22	361	318	273	273
Total cold run time: 99113 ms
Total hot run time: 30119 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4358	4307	4344	4307
q2	260	339	248	248
q3	2084	2672	2220	2220
q4	1345	1746	1282	1282
q5	4316	4236	4294	4236
q6	208	179	135	135
q7	1845	1817	1670	1670
q8	2471	2353	2550	2353
q9	7620	7537	7422	7422
q10	2904	3041	2649	2649
q11	538	478	465	465
q12	732	745	626	626
q13	3964	4236	3620	3620
q14	308	310	301	301
q15	846	805	800	800
q16	883	744	668	668
q17	1179	1390	1419	1390
q18	8368	7990	8014	7990
q19	866	829	853	829
q20	2079	2221	2073	2073
q21	4764	4532	4397	4397
q22	582	542	513	513
Total cold run time: 52520 ms
Total hot run time: 50194 ms

@doris-robot
Copy link
Copy Markdown

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 79.29% (1792/2260)
Line Coverage 64.79% (31850/49158)
Region Coverage 65.43% (15886/24280)
Branch Coverage 55.99% (8442/15078)

@doris-robot
Copy link
Copy Markdown

ClickBench: Total hot run time: 28.17 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 8900ba11086d7d2fac99151fd134c91020e4d9a3, data reload: false

query1	0.06	0.05	0.04
query2	0.12	0.08	0.07
query3	0.31	0.08	0.08
query4	1.61	0.10	0.10
query5	0.27	0.25	0.25
query6	1.14	0.64	0.63
query7	0.03	0.03	0.03
query8	0.08	0.06	0.06
query9	0.59	0.51	0.51
query10	0.54	0.54	0.54
query11	0.26	0.13	0.13
query12	0.27	0.14	0.14
query13	0.62	0.63	0.60
query14	0.99	0.98	0.98
query15	0.92	0.82	0.84
query16	0.42	0.40	0.42
query17	1.02	1.05	1.04
query18	0.25	0.24	0.23
query19	1.97	1.90	1.85
query20	0.02	0.02	0.01
query21	15.41	0.34	0.29
query22	4.90	0.11	0.13
query23	15.36	0.45	0.27
query24	2.39	0.57	0.38
query25	0.11	0.10	0.11
query26	0.19	0.18	0.18
query27	0.11	0.10	0.11
query28	3.52	1.16	0.98
query29	12.53	4.10	3.29
query30	0.31	0.12	0.11
query31	2.82	0.66	0.43
query32	3.23	0.62	0.50
query33	2.95	3.02	3.12
query34	15.99	5.07	4.50
query35	4.50	4.40	4.56
query36	0.63	0.50	0.49
query37	0.30	0.09	0.08
query38	0.27	0.05	0.05
query39	0.07	0.06	0.05
query40	0.21	0.18	0.16
query41	0.13	0.07	0.06
query42	0.09	0.05	0.05
query43	0.06	0.06	0.06
Total cold run time: 97.57 s
Total hot run time: 28.17 s

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 34.17% (41/120) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 0.00% (0/69) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.60% (19409/36901)
Line Coverage 36.12% (180597/500039)
Region Coverage 32.44% (139917/431350)
Branch Coverage 33.47% (60628/181119)

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 89.86% (62/69) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 57.27% (20711/36162)
Line Coverage 40.24% (200734/498815)
Region Coverage 36.86% (160613/435734)
Branch Coverage 37.61% (68379/181827)

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 80.83% (97/120) 🎉
Increment coverage report
Complete coverage report

@wenzhenghu
Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 34.17% (41/120) 🎉
Increment coverage report
Complete coverage report

@xuchenhao
Copy link
Copy Markdown
Contributor

run buildall

@doris-robot
Copy link
Copy Markdown

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 79.33% (1796/2264)
Line Coverage 64.79% (32001/49393)
Region Coverage 65.52% (15976/24383)
Branch Coverage 56.01% (8496/15168)

@xuchenhao
Copy link
Copy Markdown
Contributor

run buildall

@doris-robot
Copy link
Copy Markdown

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 79.33% (1796/2264)
Line Coverage 64.78% (31998/49393)
Region Coverage 65.50% (15971/24383)
Branch Coverage 55.97% (8490/15168)

@doris-robot
Copy link
Copy Markdown

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

------ Round 1 ----------------------------------
============================================
q1	17659	4489	4320	4320
q2	q3	10636	792	534	534
q4	4691	358	256	256
q5	7560	1216	1029	1029
q6	170	173	148	148
q7	780	837	660	660
q8	9302	1455	1328	1328
q9	4917	4764	4718	4718
q10	6850	1881	1621	1621
q11	464	268	239	239
q12	732	567	473	473
q13	17794	4214	3426	3426
q14	224	234	219	219
q15	963	810	787	787
q16	735	716	664	664
q17	727	852	420	420
q18	6198	5497	5414	5414
q19	1110	982	611	611
q20	524	490	392	392
q21	4595	1886	1401	1401
q22	345	290	249	249
Total cold run time: 96976 ms
Total hot run time: 28909 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4460	4359	4370	4359
q2	q3	1783	2186	1726	1726
q4	851	1154	777	777
q5	4035	4373	4306	4306
q6	179	172	140	140
q7	1704	1600	1478	1478
q8	2406	2680	2517	2517
q9	7538	7481	7376	7376
q10	2652	2852	2450	2450
q11	509	462	412	412
q12	510	570	441	441
q13	4143	4444	3719	3719
q14	282	317	300	300
q15	888	808	801	801
q16	763	776	727	727
q17	1168	1502	1331	1331
q18	6981	6890	6651	6651
q19	879	868	882	868
q20	2033	2157	2050	2050
q21	4052	3510	3376	3376
q22	492	416	374	374
Total cold run time: 48308 ms
Total hot run time: 46179 ms

@doris-robot
Copy link
Copy Markdown

TPC-DS: Total hot run time: 184883 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 dff0f16770a5bc9d5a46e0bf5f055fca70407ecd, data reload: false

query5	5130	638	539	539
query6	330	231	226	226
query7	4240	483	278	278
query8	341	246	236	236
query9	8734	2771	2776	2771
query10	570	398	349	349
query11	17046	16871	16590	16590
query12	194	127	127	127
query13	1270	453	350	350
query14	6528	3298	2983	2983
query14_1	2839	2832	2831	2831
query15	206	193	176	176
query16	991	469	458	458
query17	1079	721	629	629
query18	2711	445	348	348
query19	209	208	186	186
query20	142	131	131	131
query21	225	142	125	125
query22	5304	5805	5372	5372
query23	17577	17431	16886	16886
query23_1	17147	17185	17130	17130
query24	8241	1651	1348	1348
query24_1	1316	1283	1267	1267
query25	542	491	449	449
query26	1439	274	178	178
query27	2909	512	306	306
query28	4694	1971	1939	1939
query29	834	626	584	584
query30	342	257	220	220
query31	921	840	769	769
query32	84	80	78	78
query33	529	349	285	285
query34	930	924	576	576
query35	637	690	598	598
query36	1103	1104	938	938
query37	131	95	81	81
query38	2939	2893	2845	2845
query39	921	873	824	824
query39_1	830	825	827	825
query40	226	156	133	133
query41	61	61	58	58
query42	105	102	103	102
query43	371	388	362	362
query44	
query45	197	185	185	185
query46	886	977	602	602
query47	2114	2166	2040	2040
query48	304	315	241	241
query49	622	461	378	378
query50	665	277	212	212
query51	4104	4279	4144	4144
query52	102	107	100	100
query53	288	329	286	286
query54	301	283	261	261
query55	89	85	85	85
query56	316	303	319	303
query57	1363	1339	1288	1288
query58	292	286	271	271
query59	2610	2742	2501	2501
query60	338	354	328	328
query61	143	145	164	145
query62	621	587	524	524
query63	307	290	276	276
query64	4885	1264	975	975
query65	
query66	1376	461	365	365
query67	16431	16357	16225	16225
query68	
query69	403	313	281	281
query70	999	940	977	940
query71	340	313	304	304
query72	2812	2655	2426	2426
query73	537	537	329	329
query74	10051	9950	9800	9800
query75	2821	2719	2465	2465
query76	2306	1030	690	690
query77	376	378	308	308
query78	11365	11520	10711	10711
query79	2982	836	615	615
query80	1789	637	535	535
query81	596	275	252	252
query82	991	148	118	118
query83	344	266	237	237
query84	257	115	105	105
query85	915	496	464	464
query86	491	338	298	298
query87	3089	3129	3020	3020
query88	3556	2669	2646	2646
query89	430	363	350	350
query90	2037	179	175	175
query91	167	155	135	135
query92	83	87	70	70
query93	2027	850	511	511
query94	635	325	290	290
query95	592	352	381	352
query96	641	503	227	227
query97	2462	2489	2418	2418
query98	238	225	211	211
query99	1031	994	902	902
Total cold run time: 259994 ms
Total hot run time: 184883 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 0.00% (0/69) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.51% (19570/37272)
Line Coverage 36.16% (182808/505515)
Region Coverage 32.50% (141952/436744)
Branch Coverage 33.45% (61530/183925)

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 92.75% (64/69) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 65.64% (23962/36505)
Line Coverage 49.18% (247870/504020)
Region Coverage 46.87% (206670/440922)
Branch Coverage 47.83% (88257/184517)

@xuchenhao
Copy link
Copy Markdown
Contributor

run buildall

@doris-robot
Copy link
Copy Markdown

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 79.33% (1796/2264)
Line Coverage 64.78% (31998/49393)
Region Coverage 65.48% (15965/24383)
Branch Coverage 55.98% (8491/15168)

@doris-robot
Copy link
Copy Markdown

BE UT Coverage Report

Increment line coverage 0.00% (0/69) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.52% (19579/37282)
Line Coverage 36.14% (182713/505553)
Region Coverage 32.48% (141888/436875)
Branch Coverage 33.44% (61513/183937)

@xuchenhao
Copy link
Copy Markdown
Contributor

run buildall

@doris-robot
Copy link
Copy Markdown

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

------ Round 1 ----------------------------------
============================================
q1	17642	4544	4308	4308
q2	q3	10644	854	521	521
q4	4698	368	255	255
q5	7571	1228	1044	1044
q6	177	174	146	146
q7	789	841	669	669
q8	9280	1478	1362	1362
q9	4845	4756	4693	4693
q10	6767	1898	1619	1619
q11	454	260	226	226
q12	696	575	466	466
q13	17768	4238	3415	3415
q14	219	233	217	217
q15	958	796	783	783
q16	726	726	671	671
q17	692	883	424	424
q18	5956	5471	5248	5248
q19	1109	989	614	614
q20	485	491	389	389
q21	4355	1892	1405	1405
q22	347	282	244	244
Total cold run time: 96178 ms
Total hot run time: 28719 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4402	4359	4359	4359
q2	q3	1753	2173	1730	1730
q4	852	1160	749	749
q5	4036	4326	4374	4326
q6	182	172	140	140
q7	1740	1611	1498	1498
q8	2406	2660	2535	2535
q9	7537	7515	7501	7501
q10	2642	2824	2467	2467
q11	525	453	415	415
q12	495	592	445	445
q13	3999	4463	3566	3566
q14	393	334	278	278
q15	863	851	830	830
q16	732	771	739	739
q17	1186	1554	1367	1367
q18	7078	6920	6691	6691
q19	885	904	887	887
q20	2072	2186	2049	2049
q21	4019	3582	3301	3301
q22	486	453	396	396
Total cold run time: 48283 ms
Total hot run time: 46269 ms

@doris-robot
Copy link
Copy Markdown

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 79.33% (1796/2264)
Line Coverage 64.83% (32023/49393)
Region Coverage 65.52% (15976/24383)
Branch Coverage 56.02% (8497/15168)

@doris-robot
Copy link
Copy Markdown

TPC-DS: Total hot run time: 184913 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 24ecf73b39ae0430295ec23917588a98de504aec, data reload: false

query5	5271	631	529	529
query6	335	225	222	222
query7	4224	469	273	273
query8	346	255	244	244
query9	8765	2727	2708	2708
query10	572	394	379	379
query11	16896	17432	17143	17143
query12	223	143	130	130
query13	1313	482	355	355
query14	8076	3532	3070	3070
query14_1	3029	3063	2974	2974
query15	211	199	193	193
query16	1025	484	468	468
query17	1343	829	645	645
query18	2858	478	364	364
query19	223	216	191	191
query20	142	147	147	147
query21	230	145	128	128
query22	5684	5517	5405	5405
query23	17553	17201	17139	17139
query23_1	16969	16633	16759	16633
query24	6854	1593	1242	1242
query24_1	1230	1230	1225	1225
query25	548	454	391	391
query26	1229	260	147	147
query27	2730	468	280	280
query28	4481	1846	1838	1838
query29	795	567	509	509
query30	309	247	209	209
query31	863	756	661	661
query32	82	73	71	71
query33	511	337	291	291
query34	908	909	552	552
query35	636	690	591	591
query36	1082	1122	1006	1006
query37	129	95	88	88
query38	2957	2910	2874	2874
query39	904	870	826	826
query39_1	840	834	839	834
query40	225	153	134	134
query41	61	60	57	57
query42	108	101	103	101
query43	364	379	360	360
query44	
query45	200	187	181	181
query46	868	979	616	616
query47	2089	2176	2055	2055
query48	314	330	228	228
query49	624	463	370	370
query50	685	278	210	210
query51	4172	4155	4060	4060
query52	106	104	98	98
query53	286	335	301	301
query54	312	279	274	274
query55	94	88	79	79
query56	304	320	315	315
query57	1369	1324	1257	1257
query58	291	279	271	271
query59	2656	2757	2592	2592
query60	345	337	320	320
query61	155	147	170	147
query62	595	579	531	531
query63	316	282	280	280
query64	4890	1303	989	989
query65	
query66	1372	469	349	349
query67	16357	16539	16235	16235
query68	
query69	390	308	289	289
query70	999	953	877	877
query71	347	307	297	297
query72	2882	2647	2370	2370
query73	539	556	319	319
query74	9970	9959	9769	9769
query75	2878	2738	2515	2515
query76	2301	1025	667	667
query77	361	400	319	319
query78	11220	11497	10729	10729
query79	1555	774	597	597
query80	1363	611	551	551
query81	565	279	250	250
query82	1003	151	113	113
query83	348	258	246	246
query84	251	119	103	103
query85	888	481	429	429
query86	421	335	326	326
query87	3135	3107	3077	3077
query88	3510	2641	2622	2622
query89	423	370	352	352
query90	1967	179	173	173
query91	167	159	132	132
query92	81	77	68	68
query93	989	874	498	498
query94	679	325	308	308
query95	591	400	318	318
query96	646	516	230	230
query97	2425	2478	2401	2401
query98	233	227	217	217
query99	1016	981	902	902
Total cold run time: 257119 ms
Total hot run time: 184913 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 36.36% (44/121) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 0.00% (0/71) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.52% (19582/37283)
Line Coverage 36.16% (182812/505555)
Region Coverage 32.48% (141914/436876)
Branch Coverage 33.46% (61545/183937)

@hello-stephen
Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 89.47% (34/38) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 53.38% (20437/38284)
Line Coverage 36.92% (192581/521597)
Region Coverage 33.27% (149998/450785)
Branch Coverage 34.36% (65555/190782)

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 42.53% (37/87) 🎉
Increment coverage report
Complete coverage report

@wenzhenghu
Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 94.74% (36/38) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.82% (27690/37509)
Line Coverage 57.56% (299501/520302)
Region Coverage 54.70% (248959/455111)
Branch Coverage 56.34% (107891/191512)

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 78.02% (71/91) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 94.74% (36/38) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.82% (27689/37509)
Line Coverage 57.56% (299478/520302)
Region Coverage 54.71% (249007/455111)
Branch Coverage 56.33% (107881/191512)

@xuchenhao
Copy link
Copy Markdown
Contributor

run buildall

@wenzhenghu
Copy link
Copy Markdown
Contributor Author

run buildall

Comment thread be/src/runtime/query_context.cpp Outdated
Comment thread be/src/runtime/query_context.h Outdated
Comment thread regression-test/suites/query_p0/test_query_progress.groovy Outdated
wenzhenghu added 2 commits May 6, 2026 15:02
…ontext and unstable regression test

This commit addresses the following review suggestions:
- Removes redundant _total_task_num and _finished_task_num from QueryContext since they are already stored in QueryTaskController.
- Removes the cached raw pointer _query_task_controller to avoid potential core dumps caused by accessing a destructed object.
- Deletes the unstable regression test test_query_progress.groovy which relied on Thread.sleep and was prone to sporadic failures.
@wenzhenghu
Copy link
Copy Markdown
Contributor Author

run buildall

1 similar comment
@yiguolei
Copy link
Copy Markdown
Contributor

yiguolei commented May 9, 2026

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 78.00% (1844/2364)
Line Coverage 64.64% (32998/51047)
Region Coverage 65.22% (16375/25109)
Branch Coverage 55.74% (8733/15668)

@wenzhenghu
Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 78.00% (1844/2364)
Line Coverage 64.65% (33001/51047)
Region Coverage 65.22% (16376/25109)
Branch Coverage 55.76% (8736/15668)

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 30644 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 26ff71370459c38214403aefa7959f1297617509, 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	17711	4097	4122	4097
q2	q3	10793	916	627	627
q4	4712	469	357	357
q5	8118	1361	1144	1144
q6	369	184	148	148
q7	1017	986	773	773
q8	11117	1584	1481	1481
q9	7545	5633	5617	5617
q10	6388	2094	1854	1854
q11	478	273	256	256
q12	685	471	319	319
q13	18138	3880	2725	2725
q14	295	282	262	262
q15	q16	894	873	792	792
q17	1013	1079	749	749
q18	6517	5704	5780	5704
q19	1244	1396	1188	1188
q20	547	424	271	271
q21	4728	2435	1950	1950
q22	453	382	330	330
Total cold run time: 102762 ms
Total hot run time: 30644 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	5113	4926	4940	4926
q2	q3	4666	4786	4203	4203
q4	2279	2287	1448	1448
q5	5401	5081	5332	5081
q6	211	183	147	147
q7	2093	1869	1638	1638
q8	3447	3153	3195	3153
q9	8533	8563	8435	8435
q10	4544	4523	4266	4266
q11	633	425	404	404
q12	726	791	539	539
q13	3346	3718	2919	2919
q14	304	315	274	274
q15	q16	763	788	717	717
q17	1392	1437	1359	1359
q18	8299	7220	7228	7220
q19	1118	1084	1089	1084
q20	2209	2212	1920	1920
q21	6336	5608	5400	5400
q22	552	484	400	400
Total cold run time: 61965 ms
Total hot run time: 55533 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 170269 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 26ff71370459c38214403aefa7959f1297617509, data reload: false

query5	4325	661	533	533
query6	323	219	196	196
query7	4309	537	318	318
query8	328	230	221	221
query9	8826	4160	4110	4110
query10	446	345	303	303
query11	5779	2401	2192	2192
query12	186	132	130	130
query13	1274	579	439	439
query14	6634	5451	5098	5098
query14_1	4479	4424	4405	4405
query15	216	204	188	188
query16	1032	450	474	450
query17	1117	731	608	608
query18	2707	475	348	348
query19	224	205	161	161
query20	137	134	131	131
query21	214	134	123	123
query22	13637	13592	13261	13261
query23	17347	16311	15923	15923
query23_1	16222	16182	16113	16113
query24	7439	1765	1347	1347
query24_1	1342	1373	1366	1366
query25	578	487	436	436
query26	1309	322	164	164
query27	2679	598	351	351
query28	4388	1996	1973	1973
query29	1017	663	523	523
query30	307	236	197	197
query31	1147	1059	946	946
query32	99	75	72	72
query33	574	332	287	287
query34	1192	1116	644	644
query35	775	781	668	668
query36	1319	1367	1160	1160
query37	159	112	93	93
query38	3203	3164	3058	3058
query39	944	942	916	916
query39_1	875	880	886	880
query40	234	162	138	138
query41	67	62	62	62
query42	113	111	106	106
query43	329	338	304	304
query44	
query45	215	201	194	194
query46	1067	1209	751	751
query47	2268	2271	2099	2099
query48	403	447	272	272
query49	642	531	427	427
query50	735	288	222	222
query51	4324	4238	4252	4238
query52	106	110	98	98
query53	252	284	202	202
query54	322	271	252	252
query55	95	90	84	84
query56	318	327	291	291
query57	1407	1380	1290	1290
query58	294	270	270	270
query59	1602	1655	1428	1428
query60	353	331	322	322
query61	162	154	158	154
query62	670	620	548	548
query63	240	207	218	207
query64	2331	832	651	651
query65	
query66	1703	498	381	381
query67	30070	29976	29931	29931
query68	
query69	474	337	306	306
query70	1026	1036	1013	1013
query71	309	281	271	271
query72	3005	2671	2491	2491
query73	870	745	415	415
query74	5110	4878	4757	4757
query75	2789	2672	2348	2348
query76	2346	1170	836	836
query77	430	450	364	364
query78	12929	12902	12311	12311
query79	1536	988	758	758
query80	712	635	516	516
query81	460	280	248	248
query82	1350	164	123	123
query83	361	295	253	253
query84	262	151	117	117
query85	948	589	527	527
query86	421	351	312	312
query87	3395	3359	3233	3233
query88	3617	2704	2694	2694
query89	447	387	338	338
query90	1986	174	201	174
query91	179	159	137	137
query92	89	77	73	73
query93	973	968	561	561
query94	544	340	296	296
query95	656	372	363	363
query96	1011	764	352	352
query97	2730	2687	2586	2586
query98	248	254	242	242
query99	1160	1121	983	983
Total cold run time: 255036 ms
Total hot run time: 170269 ms

@yiguolei
Copy link
Copy Markdown
Contributor

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

I reviewed the current PR head after reading the Doris code-review skill, the changed module guides, and all existing inline review threads. I am not adding duplicate inline comments: the blocking issues I still see are already covered by existing threads, including the public proc subtree removal for /current_queries/<query_id> and /fragments, the /current_query_stmts schema/semantics compatibility break, the /rest/v2/manager/query/current_queries compatibility break, and the incomplete aggregation/DTO coverage for the new TQueryStatistics fields in the realtime statistics API.

Checkpoint conclusions:

  • Goal/test: The goal appears to be adding current-query runtime/progress statistics. The implementation adds BE counters and FE display/unit tests, but the user-visible compatibility regressions and API inconsistency mean the goal is not safely accomplished yet.
  • Scope/focus: The change is broader than necessary because it deletes/repoints existing proc nodes and REST behavior instead of only extending the intended statistics surface.
  • Concurrency: BE task counters are atomic and the FE snapshot path avoids the previously discussed synchronous traversal race, but the affected public read paths still need compatibility-safe behavior.
  • Lifecycle: Moving task counters into QueryTaskController addresses the final-report lifetime concern that was previously raised.
  • Config/compatibility: No new config was added. There are incompatible proc/REST contract changes that remain blocking and are already covered by existing threads.
  • Parallel paths: Query-stat surfaces are not all updated consistently; the realtime statistics endpoint still omits the newly added fields, as already noted in the existing thread.
  • Tests: Added unit tests cover formatting and merge logic, and the unstable regression test was removed, but there is no replacement end-to-end coverage proving compatibility of existing proc/REST contracts.
  • Observability/data correctness/storage: No storage/transaction correctness concerns found in this PR; observability is the feature itself, but API consistency remains incomplete.

User focus: no additional user-provided review focus was specified, and I found no extra focus-specific issue beyond the existing blockers.

@yiguolei
Copy link
Copy Markdown
Contributor

skip check_coverage

@yiguolei yiguolei merged commit 6b051db into apache:master May 10, 2026
28 of 31 checks passed
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.

6 participants