Skip to content

Conversation

@kunable2333
Copy link

What problem does this PR solve?

When triggering a refresh mtmv task during schema change job, modify directly the mtmv status at the end of refresh mtmv, which resulted directly in the behavior of the materialized view being inconsistent with #49041
add check base table status before modifying the mtmv status at the end of the refresh mtmv task

Issue Number: close #xxx

Related PR: #49041

Problem Summary:
before changing the mtmv status at the end of mtmv refresh, check if the base table status is SCHEMA_CHANGE

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.
      During the execution of the scheme change task, queries which related to the base table ,cannot be rewritten with related asynchronous materialized views.
      The previous logic was that after the refresh task was completed, the materialized view could be rewritten.
  • 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

…h, check if the base table status is SCHEMA_CHANGE
@hello-stephen
Copy link
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?

@kunable2333
Copy link
Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17742	5705	5560	5560
q2	1944	290	189	189
q3	10279	1361	694	694
q4	10208	997	513	513
q5	7545	2365	2275	2275
q6	183	163	130	130
q7	881	754	633	633
q8	9301	1322	1050	1050
q9	6702	5077	5019	5019
q10	6885	2330	1987	1987
q11	467	270	256	256
q12	340	361	230	230
q13	17775	3448	2968	2968
q14	234	253	213	213
q15	536	466	476	466
q16	413	441	368	368
q17	550	839	351	351
q18	7345	6989	6856	6856
q19	2705	984	547	547
q20	313	318	216	216
q21	2718	3062	2393	2393
q22	1033	1028	987	987
Total cold run time: 106099 ms
Total hot run time: 33901 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5881	5928	5804	5804
q2	230	319	215	215
q3	2108	2584	2181	2181
q4	1405	1692	1299	1299
q5	4219	4487	4433	4433
q6	227	183	132	132
q7	1908	1932	1840	1840
q8	2519	2531	2401	2401
q9	7191	7505	7349	7349
q10	3164	3255	3003	3003
q11	561	518	502	502
q12	758	803	640	640
q13	3395	3736	3187	3187
q14	289	305	297	297
q15	492	469	485	469
q16	453	476	450	450
q17	1167	1402	1394	1394
q18	7949	7792	7629	7629
q19	12794	964	900	900
q20	2836	1944	1723	1723
q21	14447	4318	4233	4233
q22	1075	1024	992	992
Total cold run time: 75068 ms
Total hot run time: 51073 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 171705 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 3f1338877f625730cb6afeca65461a683dd6a9e1, data reload: false

============================================
query1	999	378	447	378
query2	6510	2014	1700	1700
query3	6741	223	218	218
query4	26597	23755	22892	22892
query5	4485	630	512	512
query6	318	242	229	229
query7	4656	558	320	320
query8	306	247	245	245
query9	8624	3140	3160	3140
query10	476	344	291	291
query11	15728	14954	14704	14704
query12	186	136	130	130
query13	1665	552	425	425
query14	9605	7748	7765	7748
query15	226	200	176	176
query16	7130	698	504	504
query17	984	774	647	647
query18	1999	438	328	328
query19	224	214	186	186
query20	147	148	139	139
query21	221	129	115	115
query22	3934	3969	3800	3800
query23	34523	34204	33996	33996
query24	5256	2412	2393	2393
query25	510	521	434	434
query26	708	293	200	200
query27	2228	504	355	355
query28	3021	2326	2317	2317
query29	606	604	486	486
query30	291	232	195	195
query31	820	811	691	691
query32	88	81	78	78
query33	487	415	373	373
query34	798	845	517	517
query35	818	863	760	760
query36	1005	1049	943	943
query37	140	109	93	93
query38	3967	3941	3960	3941
query39	1446	1386	1375	1375
query40	236	143	152	143
query41	63	57	55	55
query42	144	121	126	121
query43	537	530	491	491
query44	1418	890	877	877
query45	193	188	184	184
query46	951	1053	671	671
query47	1810	1809	1732	1732
query48	412	433	319	319
query49	690	516	415	415
query50	655	682	425	425
query51	4276	4297	4178	4178
query52	141	134	128	128
query53	290	293	218	218
query54	651	640	556	556
query55	89	85	89	85
query56	356	354	341	341
query57	1209	1209	1120	1120
query58	334	326	324	324
query59	2619	2783	2721	2721
query60	410	391	405	391
query61	147	120	125	120
query62	739	743	659	659
query63	260	221	215	215
query64	2349	1132	817	817
query65	4215	4079	4103	4079
query66	1065	451	324	324
query67	query68	17394	603	589	589
query69	1001	298	288	288
query70	1507	1131	1158	1131
query71	711	331	325	325
query72	9245	2298	2324	2298
query73	3673	631	357	357
query74	9058	9017	8802	8802
query75	7717	3091	2663	2663
query76	8922	1203	781	781
query77	1146	406	333	333
query78	9441	9755	9154	9154
query79	15018	601	580	580
query80	2550	557	493	493
query81	547	265	238	238
query82	521	154	115	115
query83	366	290	282	282
query84	307	96	79	79
query85	918	369	383	369
query86	379	315	298	298
query87	4350	4234	4171	4171
query88	5490	2250	2274	2250
query89	492	368	319	319
query90	2527	233	232	232
query91	142	136	111	111
query92	92	72	66	66
query93	6547	959	653	653
query94	1197	384	283	283
query95	422	331	322	322
query96	512	586	286	286
query97	2678	2693	2631	2631
query98	239	227	220	220
query99	1482	1362	1303	1303
Total cold run time: 301323 ms
Total hot run time: 171705 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.08	0.04	0.04
query3	0.24	0.08	0.07
query4	1.61	0.10	0.10
query5	0.44	0.41	0.45
query6	1.18	0.68	0.68
query7	0.03	0.02	0.01
query8	0.05	0.03	0.04
query9	0.56	0.47	0.46
query10	0.53	0.53	0.52
query11	0.15	0.10	0.10
query12	0.14	0.12	0.11
query13	0.66	0.63	0.64
query14	0.94	1.08	1.06
query15	1.00	0.87	0.89
query16	0.40	0.39	0.38
query17	1.05	1.07	1.09
query18	0.21	0.20	0.20
query19	2.00	1.92	1.76
query20	0.01	0.01	0.01
query21	15.39	0.92	0.55
query22	0.75	1.19	0.99
query23	14.71	1.18	0.66
query24	6.85	0.81	1.54
query25	0.50	0.28	0.08
query26	0.55	0.17	0.14
query27	0.06	0.05	0.05
query28	9.78	0.86	0.45
query29	12.61	3.81	3.32
query30	3.12	2.98	2.92
query31	2.81	0.57	0.39
query32	3.24	0.57	0.50
query33	3.01	3.19	3.29
query34	16.03	5.24	4.88
query35	4.90	4.96	4.99
query36	0.70	0.51	0.50
query37	0.09	0.08	0.07
query38	0.06	0.05	0.04
query39	0.03	0.02	0.03
query40	0.17	0.14	0.13
query41	0.08	0.02	0.03
query42	0.04	0.03	0.03
query43	0.04	0.03	0.03
Total cold run time: 106.84 s
Total hot run time: 33.27 s

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 71.43% (10/14) 🎉
Increment coverage report
Complete coverage report

@kunable2333 kunable2333 closed this Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants