Skip to content

[fix](test) use Cloud Table Stream read-state hook - #67079

Merged
hello-stephen merged 1 commit into
apache:masterfrom
Gabriel39:fix/cloud-table-stream-test-compile
Aug 25, 2026
Merged

hello-stephen merged 1 commit into
apache:masterfrom
Gabriel39:fix/cloud-table-stream-test-compile

Conversation

@Gabriel39

@Gabriel39 Gabriel39 commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

A Cloud Table Stream test still instantiated ResolveCloudTableStreamReadState after that generic rewrite rule was removed, causing FE test compilation to fail.

What is changed?

Invoke CloudTableStreamReadStateHook.resolve through the test existing reflection utility. This keeps the partial-response retry coverage on the production post-analysis lifecycle that now owns read-state installation.

Testing

  • InsertIntoTableCommandTableStreamTest: 13 tests passed
  • FE Checkstyle passed

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

@Gabriel39

Copy link
Copy Markdown
Contributor Author

run buildall

@Gabriel39

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.

Review opinion: approve

No actionable issues found in PR #67079.

Critical checkpoint conclusions:

  • Goal and test proof: the patch removes the stale test reference to the deleted ResolveCloudTableStreamReadState rule and exercises the production owner, CloudTableStreamReadStateHook.resolve. The existing assertions still prove that a missing-binding response raises the expected Nereids AnalysisException, installs no wrapper state, can be retried successfully, and issues two complete requests.
  • Scope and clarity: this is a minimal, focused test-only change (one file, five additions and three deletions) with a useful lifecycle comment and no production behavior change.
  • Lifecycle and error handling: BindRelation registers the hook in Cloud mode, NereidsPlanner runs it after analysis, and lineage captures the same analyzed-plan object used here. The reflection helper rethrows runtime causes unchanged, while response membership validation finishes before wrapper installation for the failure under test, preserving atomic retry behavior.
  • Concurrency and locking: no thread, lock, shared-state access pattern, or concurrent lifecycle is introduced by this patch; the mocked calls and assertions are sequential.
  • Parallel paths and coverage: neighboring tests cover hook registration/afterAnalyze, CTE and rewrite behavior, snapshot scans, predicate elimination, and Cloud partition selection. This retry test remains correctly focused on partial-response atomicity.
  • Compatibility, configuration, persistence, writes, and FE-BE propagation: no configuration definition, protocol/storage format, journal, transaction, data-write path, or FE-BE variable changes are present.
  • Performance and observability: the only overhead is two reflective calls in a unit test; no production hot path or observability requirement changes.
  • Test status: the PR description reports all 13 tests in InsertIntoTableCommandTableStreamTest passed. I did not run builds or tests because the review runner explicitly prohibits builds. Live Checkstyle passed. The FE UT job failed before reaching fe-core because Maven Central connections reset while resolving fe-kerberos dependencies (the 163 tests reached before that point passed), so that failure is unrelated to this test-only patch; the compile job was still pending during review.
  • User focus: no additional focus point was supplied; the complete PR was reviewed.

One normal full-review pass and a separate risk-focused pass both returned NO_NEW_VALUABLE_FINDINGS. The final changed-file, unresolved-candidate, and live duplicate sweeps are clean, so this review is complete with zero inline comments.

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 100% (0/0) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17566	3010	3015	3010
q2	1893	227	144	144
q3	10479	905	520	520
q4	4675	250	201	201
q5	7684	580	388	388
q6	135	113	93	93
q7	531	495	381	381
q8	9239	937	958	937
q9	3459	2381	2400	2381
q10	6573	838	706	706
q11	401	199	174	174
q12	611	257	191	191
q13	18145	1512	1166	1166
q14	158	146	136	136
q15	q16	429	404	368	368
q17	786	766	782	766
q18	3075	2256	2243	2243
q19	1100	930	799	799
q20	360	282	199	199
q21	4862	1556	1875	1556
q22	333	265	229	229
Total cold run time: 92494 ms
Total hot run time: 16588 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	3340	3311	3324	3311
q2	205	212	168	168
q3	2217	2276	2170	2170
q4	1179	1162	880	880
q5	2167	2102	2086	2086
q6	177	125	90	90
q7	1016	935	882	882
q8	1594	1416	1392	1392
q9	3099	3072	3081	3072
q10	1869	1782	1624	1624
q11	354	268	250	250
q12	450	428	332	332
q13	1484	1531	1162	1162
q14	170	163	167	163
q15	q16	387	394	358	358
q17	1042	1023	1012	1012
q18	4931	4389	4727	4389
q19	880	886	828	828
q20	969	941	814	814
q21	3528	3122	3307	3122
q22	411	344	322	322
Total cold run time: 31469 ms
Total hot run time: 28427 ms

@hello-stephen

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

query5	4292	410	330	330
query6	399	135	121	121
query7	4962	423	236	236
query8	298	135	131	131
query9	8692	2863	2865	2863
query10	395	223	186	186
query11	5399	1027	901	901
query12	118	72	68	68
query13	1184	411	319	319
query14	6068	2181	2051	2051
query14_1	1947	1938	1919	1919
query15	169	120	112	112
query16	915	366	340	340
query17	798	458	331	331
query18	2314	320	225	225
query19	157	130	106	106
query20	70	66	69	66
query21	194	103	86	86
query22	5388	5323	5244	5244
query23	6679	6164	6062	6062
query23_1	6065	6062	5992	5992
query24	7308	1098	757	757
query24_1	790	785	746	746
query25	419	288	231	231
query26	1227	229	125	125
query27	2782	420	257	257
query28	4678	1493	1486	1486
query29	912	449	350	350
query30	259	154	134	134
query31	807	399	324	324
query32	99	47	46	46
query33	445	210	173	173
query34	994	863	478	478
query35	394	400	337	337
query36	588	571	526	526
query37	124	80	68	68
query38	984	833	807	807
query39	494	512	480	480
query39_1	472	469	470	469
query40	203	87	74	74
query41	51	50	50	50
query42	73	70	76	70
query43	238	236	215	215
query44	1009	547	538	538
query45	116	105	99	99
query46	742	865	510	510
query47	743	741	709	709
query48	305	288	229	229
query49	530	235	188	188
query50	751	264	186	186
query51	8056	8005	7949	7949
query52	78	72	65	65
query53	193	206	147	147
query54	241	170	175	170
query55	79	59	60	59
query56	207	172	165	165
query57	687	633	591	591
query58	210	185	196	185
query59	1215	1216	1072	1072
query60	267	195	187	187
query61	152	148	127	127
query62	348	201	179	179
query63	174	139	140	139
query64	2800	697	732	697
query65	1647	1660	1565	1565
query66	1955	255	230	230
query67	10011	9806	9471	9471
query68	3019	1141	689	689
query69	363	213	186	186
query70	662	612	588	588
query71	256	179	166	166
query72	2329	1724	1572	1572
query73	672	568	339	339
query74	2003	1222	1121	1121
query75	1184	1084	951	951
query76	2370	730	547	547
query77	252	261	199	199
query78	3988	3636	3201	3201
query79	2782	834	600	600
query80	1593	312	267	267
query81	524	156	136	136
query82	642	131	101	101
query83	276	203	183	183
query84	298	112	91	91
query85	804	351	295	295
query86	408	177	173	173
query87	996	971	886	886
query88	2765	2094	2102	2094
query89	282	195	172	172
query90	1882	136	126	126
query91	129	122	101	101
query92	52	49	42	42
query93	1534	1030	689	689
query94	665	249	209	209
query95	530	322	236	236
query96	846	588	264	264
query97	1068	1119	1007	1007
query98	163	133	129	129
query99	424	349	302	302
Total cold run time: 178573 ms
Total hot run time: 81204 ms

@hello-stephen

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

query1	0.00	0.01	0.01
query2	0.08	0.04	0.03
query3	0.25	0.11	0.11
query4	1.60	0.11	0.11
query5	0.18	0.16	0.16
query6	1.25	0.69	0.69
query7	0.04	0.01	0.01
query8	0.04	0.03	0.03
query9	0.28	0.20	0.21
query10	0.34	0.35	0.35
query11	0.17	0.12	0.11
query12	0.15	0.12	0.12
query13	0.30	0.30	0.30
query14	0.45	0.46	0.44
query15	0.35	0.34	0.34
query16	0.21	0.21	0.24
query17	0.69	0.64	0.65
query18	0.19	0.17	0.17
query19	1.16	1.08	1.15
query20	0.01	0.01	0.01
query21	15.44	0.17	0.13
query22	5.04	0.04	0.04
query23	16.18	0.25	0.10
query24	3.10	0.32	0.24
query25	0.10	0.05	0.03
query26	0.72	0.15	0.13
query27	0.05	0.03	0.04
query28	3.60	0.57	0.27
query29	12.44	3.15	2.56
query30	0.25	0.13	0.12
query31	2.81	0.36	0.17
query32	3.48	0.31	0.23
query33	1.45	1.56	1.38
query34	15.37	2.12	1.76
query35	1.70	1.72	1.68
query36	0.47	0.29	0.29
query37	0.06	0.04	0.04
query38	0.05	0.03	0.02
query39	0.03	0.02	0.02
query40	0.12	0.07	0.07
query41	0.08	0.02	0.02
query42	0.03	0.02	0.02
query43	0.03	0.02	0.03
Total cold run time: 90.34 s
Total hot run time: 14.49 s

@hello-stephen
hello-stephen merged commit 3401587 into apache:master Aug 25, 2026
32 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@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 Aug 25, 2026
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. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants