Skip to content

Conversation

@xy720
Copy link
Member

@xy720 xy720 commented May 7, 2025

What problem does this PR solve?

related pr: #45255

Currently, when the MS drop node/drop cluster api is called to the drop sql node/sql cluster, there is a 5 minute safe drop protection mechanism, but it is not necessary when destroying a newly created doris instance.

  1. Allow bypassing the safe-time-check when calling the drop cluster api of meta service by setting the safe_derop_on_sql_cluster param to false

  2. Add a configuration for the safe-time-check (default 5 minutes) to adjust this value

Api call example:
curl -X POST -H "Content-Type: text/plain" -d '{"instance_id": "123333", "cluster": {"cluster_name": "RESERVED_CLUSTER_NAME_FOR_SQL_SERVER", "cluster_id": "RESERVED_CLUSTER_ID_FOR_SQL_SERVER"}, "safe_drop_on_sql_cluster": "false"}' http://127.0.0.1:5000/MetaService/http/drop_cluster?token=xxxxxxxx

reopen #50535

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

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

@xy720
Copy link
Member Author

xy720 commented May 7, 2025

run buildall

@xy720 xy720 closed this May 7, 2025
@xy720 xy720 reopened this May 7, 2025
@xy720
Copy link
Member Author

xy720 commented May 7, 2025

run buildall

@xy720 xy720 force-pushed the fix-safe-drop-cluster-2 branch from 33eae59 to 98259ef Compare May 7, 2025 18:10
@xy720
Copy link
Member Author

xy720 commented May 7, 2025

run buildall

@doris-robot
Copy link

TeamCity cloud ut coverage result:
Function Coverage: 83.17% (1102/1325)
Line Coverage: 66.08% (18511/28011)
Region Coverage: 65.68% (9221/14039)
Branch Coverage: 55.53% (4961/8934)
Coverage Report: http://coverage.selectdb-in.cc/coverage/98259ef1b4a54a130ab371661907ff5d6ac8e876_98259ef1b4a54a130ab371661907ff5d6ac8e876_cloud/report/index.html

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	26152	5264	4980	4980
q2	2070	281	182	182
q3	10482	1285	737	737
q4	10220	1048	535	535
q5	7605	2434	2348	2348
q6	183	164	132	132
q7	926	736	612	612
q8	9319	1301	1088	1088
q9	6895	5095	5086	5086
q10	6864	2302	1873	1873
q11	478	285	276	276
q12	352	355	209	209
q13	17787	3732	3107	3107
q14	233	232	204	204
q15	552	466	502	466
q16	415	427	373	373
q17	599	878	356	356
q18	7602	7414	7228	7228
q19	1732	956	558	558
q20	337	354	221	221
q21	3854	3431	2546	2546
q22	1057	985	939	939
Total cold run time: 115714 ms
Total hot run time: 34056 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5187	5275	5044	5044
q2	247	331	230	230
q3	2143	2672	2293	2293
q4	1337	1783	1413	1413
q5	4463	4414	4453	4414
q6	223	185	131	131
q7	2043	1940	1790	1790
q8	2613	2616	2655	2616
q9	7185	7160	7103	7103
q10	3022	3195	2733	2733
q11	591	498	482	482
q12	659	770	596	596
q13	3570	3910	3347	3347
q14	297	292	283	283
q15	513	468	464	464
q16	458	483	449	449
q17	1191	1568	1406	1406
q18	7819	7497	7371	7371
q19	820	950	1070	950
q20	1959	1939	1837	1837
q21	5080	4750	4598	4598
q22	1097	1072	1021	1021
Total cold run time: 52517 ms
Total hot run time: 50571 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 192751 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 98259ef1b4a54a130ab371661907ff5d6ac8e876, data reload: false

query1	1401	1075	1106	1075
query2	6292	1844	1825	1825
query3	11054	4624	4546	4546
query4	53371	24264	23386	23386
query5	5269	471	460	460
query6	414	208	197	197
query7	5240	522	286	286
query8	358	255	230	230
query9	7083	2537	2560	2537
query10	441	318	267	267
query11	15277	15049	14730	14730
query12	158	106	103	103
query13	1217	511	382	382
query14	10009	6309	6357	6309
query15	208	177	170	170
query16	6951	620	515	515
query17	1040	720	549	549
query18	1524	429	309	309
query19	197	186	169	169
query20	133	116	122	116
query21	199	125	109	109
query22	4508	4487	4402	4402
query23	34138	33435	33594	33435
query24	6823	2433	2477	2433
query25	470	462	430	430
query26	630	276	176	176
query27	2158	519	326	326
query28	3047	2115	2109	2109
query29	581	564	425	425
query30	263	217	186	186
query31	855	871	796	796
query32	73	60	62	60
query33	441	369	313	313
query34	794	863	526	526
query35	770	817	760	760
query36	920	1019	898	898
query37	151	100	77	77
query38	4127	4343	4180	4180
query39	1538	1408	1443	1408
query40	204	123	105	105
query41	55	51	55	51
query42	118	110	104	104
query43	499	501	481	481
query44	1303	804	818	804
query45	188	180	169	169
query46	844	1017	637	637
query47	1903	1881	1776	1776
query48	381	417	304	304
query49	694	517	418	418
query50	654	713	408	408
query51	4214	4232	4138	4138
query52	115	107	98	98
query53	236	268	187	187
query54	610	589	521	521
query55	80	82	85	82
query56	303	317	313	313
query57	1149	1186	1117	1117
query58	259	256	254	254
query59	2650	2802	2659	2659
query60	348	316	317	316
query61	143	130	119	119
query62	735	792	691	691
query63	233	183	192	183
query64	1416	1033	757	757
query65	4419	4295	4252	4252
query66	728	407	311	311
query67	15756	15486	15375	15375
query68	4355	878	530	530
query69	501	297	267	267
query70	1215	1127	1083	1083
query71	438	310	286	286
query72	5973	4882	4976	4882
query73	734	693	347	347
query74	8925	9021	8921	8921
query75	3402	3270	2697	2697
query76	2896	1201	748	748
query77	597	362	272	272
query78	9931	10139	9271	9271
query79	1214	812	569	569
query80	771	525	453	453
query81	518	247	221	221
query82	392	127	96	96
query83	259	239	231	231
query84	296	102	96	96
query85	732	346	304	304
query86	326	298	295	295
query87	4419	4427	4422	4422
query88	2802	2192	2208	2192
query89	407	316	284	284
query90	1735	212	218	212
query91	155	157	125	125
query92	67	62	57	57
query93	1439	945	573	573
query94	605	408	300	300
query95	390	317	296	296
query96	480	561	271	271
query97	3153	3195	3131	3131
query98	223	212	203	203
query99	1337	1390	1276	1276
Total cold run time: 291047 ms
Total hot run time: 192751 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.14	0.11	0.10
query3	0.35	0.20	0.20
query4	1.59	0.20	0.09
query5	0.54	0.52	0.55
query6	1.18	0.72	0.72
query7	0.02	0.02	0.02
query8	0.05	0.05	0.05
query9	0.62	0.52	0.53
query10	0.56	0.58	0.58
query11	0.26	0.12	0.12
query12	0.26	0.13	0.14
query13	0.62	0.62	0.62
query14	0.79	0.81	0.81
query15	0.95	0.89	0.88
query16	0.37	0.37	0.37
query17	1.05	1.03	1.04
query18	0.18	0.18	0.18
query19	1.96	1.76	1.82
query20	0.02	0.01	0.01
query21	15.40	0.98	0.67
query22	0.93	1.01	0.76
query23	14.69	1.56	0.75
query24	5.56	0.56	0.29
query25	0.17	0.09	0.09
query26	0.56	0.23	0.18
query27	0.08	0.08	0.09
query28	11.02	1.17	0.56
query29	12.52	4.06	3.37
query30	0.29	0.08	0.07
query31	2.82	0.65	0.42
query32	3.23	0.59	0.50
query33	3.11	3.02	3.12
query34	16.76	5.12	4.38
query35	4.45	4.50	4.51
query36	0.62	0.53	0.50
query37	0.19	0.18	0.16
query38	0.18	0.16	0.15
query39	0.05	0.04	0.05
query40	0.20	0.15	0.15
query41	0.10	0.06	0.05
query42	0.06	0.04	0.06
query43	0.05	0.05	0.05
Total cold run time: 104.58 s
Total hot run time: 29.52 s

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 55.60% (14870/26747)
Line Coverage 44.63% (131202/294004)
Region Coverage 43.35% (66828/154160)
Branch Coverage 37.94% (33728/88898)

@xy720
Copy link
Member Author

xy720 commented May 8, 2025

run p0

@xy720
Copy link
Member Author

xy720 commented May 8, 2025

run external

1 similar comment
@xy720
Copy link
Member Author

xy720 commented May 8, 2025

run external

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 79.40% (20839/26245)
Line Coverage 72.76% (213537/293491)
Region Coverage 70.88% (128008/180601)
Branch Coverage 64.28% (65232/101474)

@deardeng
Copy link
Contributor

@xy720 这个pr怎么没推进合入啊?

@github-actions
Copy link
Contributor

We're closing this PR because it hasn't been updated in a while.
This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you'd like to revive this PR, please reopen it and feel free a maintainer to remove the Stale tag!

@github-actions github-actions bot added the Stale label Dec 15, 2025
@github-actions github-actions bot closed this Dec 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants