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

[PR] [fix](point-query) Refresh stale prepared short-circuit plans [doris]

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

   
   Problem Summary:
       Prepared point queries cache short-circuit planner state and the associated StatementContext.
       When a target table is renamed, replaced, or swapped, the cached plan may still reference stale
       table metadata and reuse an outdated StatementContext, causing execution failures or incorrect
       table access.
   
       This change tracks the table name captured during planning, checks dropped/renamed/schema-changed
       tables before reusing the short-circuit context, and reparses the prepared SQL to rebuild the
       prepared plan with a fresh StatementContext when the cached context is stale. Bound placeholder
       values and MySQL parameter types are preserved across refresh. Regression coverage is added for
       rename, replace, and swap scenarios.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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


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


Re: [PR] [fix](point-query) Refresh stale prepared short-circuit plans [doris]

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

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 172374 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
   TPC-DS sf100 test result on commit fc6950471e974fb948cf8fb3c0c9a0330b6c9362, data reload: false
   
   query5	4381	671	535	535
   query6	340	220	203	203
   query7	4282	569	317	317
   query8	327	241	228	228
   query9	8810	4132	4096	4096
   query10	446	339	306	306
   query11	5793	2528	2269	2269
   query12	185	134	133	133
   query13	1283	605	456	456
   query14	6129	5535	5217	5217
   query14_1	4540	4572	4499	4499
   query15	212	213	180	180
   query16	1033	453	436	436
   query17	1133	719	585	585
   query18	2635	491	379	379
   query19	207	205	162	162
   query20	140	131	127	127
   query21	212	140	119	119
   query22	13681	13716	13419	13419
   query23	17091	16533	16230	16230
   query23_1	16322	16349	16298	16298
   query24	7385	1775	1316	1316
   query24_1	1327	1334	1333	1333
   query25	590	507	449	449
   query26	1343	315	182	182
   query27	2732	556	350	350
   query28	4467	2023	2017	2017
   query29	1020	651	532	532
   query30	312	246	199	199
   query31	1138	1090	973	973
   query32	90	78	78	78
   query33	566	371	312	312
   query34	1185	1173	677	677
   query35	776	802	713	713
   query36	1407	1390	1241	1241
   query37	159	109	95	95
   query38	3219	3210	3128	3128
   query39	943	925	892	892
   query39_1	891	883	906	883
   query40	237	151	138	138
   query41	72	70	69	69
   query42	113	112	110	110
   query43	360	362	316	316
   query44	
   query45	221	208	202	202
   query46	1128	1183	767	767
   query47	2345	2336	2258	2258
   query48	417	414	318	318
   query49	653	510	410	410
   query50	1057	365	258	258
   query51	4370	4282	4277	4277
   query52	108	109	98	98
   query53	261	286	214	214
   query54	338	292	270	270
   query55	96	97	95	95
   query56	337	327	314	314
   query57	1462	1421	1346	1346
   query58	308	282	272	272
   query59	1604	1677	1439	1439
   query60	336	343	340	340
   query61	190	179	205	179
   query62	690	658	590	590
   query63	242	204	210	204
   query64	2404	825	648	648
   query65	
   query66	1657	472	359	359
   query67	29880	29561	29500	29500
   query68	
   query69	463	352	313	313
   query70	1068	1001	1008	1001
   query71	316	277	270	270
   query72	2991	2726	2429	2429
   query73	879	744	416	416
   query74	5094	4922	4800	4800
   query75	2720	2615	2281	2281
   query76	2283	1170	805	805
   query77	422	414	341	341
   query78	12357	12347	11811	11811
   query79	1478	1065	792	792
   query80	1286	574	460	460
   query81	500	284	240	240
   query82	1325	155	121	121
   query83	358	272	247	247
   query84	269	147	113	113
   query85	959	543	461	461
   query86	452	346	326	326
   query87	3434	3394	3252	3252
   query88	3608	2755	2740	2740
   query89	466	387	344	344
   query90	1786	186	196	186
   query91	187	173	141	141
   query92	83	80	71	71
   query93	1579	1409	870	870
   query94	677	362	329	329
   query95	693	479	356	356
   query96	1117	792	332	332
   query97	2764	2704	2620	2620
   query98	231	230	228	228
   query99	1194	1155	1033	1033
   Total cold run time: 255543 ms
   Total hot run time: 172374 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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


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


Re: [PR] [fix](point-query) Refresh stale prepared short-circuit plans [doris]

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

   /review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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


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


Re: [PR] [fix](point-query) Refresh stale prepared short-circuit plans [doris]

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

   /review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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


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


Re: [PR] [fix](point-query) Refresh stale prepared short-circuit plans [doris]

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

   
   run buildall
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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


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


Re: [PR] [fix](point-query) Refresh stale prepared short-circuit plans [doris]

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

   # FE Regression Coverage Report
   Increment line coverage `  69.70% (69/99)` :tada:
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/63920_fc6950471e974fb948cf8fb3c0c9a0330b6c9362_merge_fe/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/63920_fc6950471e974fb948cf8fb3c0c9a0330b6c9362_merge_fe/report/index.html)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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


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


Re: [PR] [fix](point-query) Refresh stale prepared short-circuit plans [doris]

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

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 31253 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
   Tpch sf100 test result on commit fc6950471e974fb948cf8fb3c0c9a0330b6c9362, 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	17568	4039	3990	3990
   q2	q3	10763	1374	826	826
   q4	4703	467	351	351
   q5	7760	2231	2073	2073
   q6	375	170	138	138
   q7	974	810	655	655
   q8	9351	1805	1681	1681
   q9	7017	5029	4948	4948
   q10	6452	2188	1869	1869
   q11	450	276	244	244
   q12	690	423	297	297
   q13	18210	3322	2771	2771
   q14	267	259	236	236
   q15	q16	819	796	707	707
   q17	926	949	834	834
   q18	6850	5786	5541	5541
   q19	1344	1264	1036	1036
   q20	512	408	254	254
   q21	5982	2559	2506	2506
   q22	432	353	296	296
   Total cold run time: 101445 ms
   Total hot run time: 31253 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	4313	4271	4277	4271
   q2	q3	4562	4909	4365	4365
   q4	2062	2180	1357	1357
   q5	4427	4292	4720	4292
   q6	255	203	142	142
   q7	2002	1868	1648	1648
   q8	2806	2134	2183	2134
   q9	7994	8085	7968	7968
   q10	4840	4812	4433	4433
   q11	554	398	366	366
   q12	746	756	529	529
   q13	3253	3633	2989	2989
   q14	321	306	282	282
   q15	q16	706	731	649	649
   q17	1333	1314	1305	1305
   q18	7800	7338	6830	6830
   q19	1145	1091	1077	1077
   q20	2211	2205	1943	1943
   q21	5308	4629	4455	4455
   q22	503	459	402	402
   Total cold run time: 57141 ms
   Total hot run time: 51437 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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


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


Re: [PR] [fix](point-query) Refresh stale prepared short-circuit plans [doris]

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

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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


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


Re: [PR] [fix](point-query) Refresh stale prepared short-circuit plans [doris]

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

   OpenCode automated review failed and did not complete.
   
   Error: Error: Token refresh failed: 401
   Workflow run: https://github.com/apache/doris/actions/runs/26716337495
   
   Please inspect the workflow logs and rerun the review after the underlying issue is resolved.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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


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


Re: [PR] [fix](point-query) Refresh stale prepared short-circuit plans [doris]

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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


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