Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enhancement](cloud) support BE http action: /api/file_cache?op=hash #40831

Merged
merged 7 commits into from
Sep 23, 2024

Conversation

yagagagaga
Copy link
Contributor

@yagagagaga yagagagaga commented Sep 13, 2024

Proposed changes

Add a http action which can calculate its hash value based on the path you input. It's useful when you debug.

API

GET /api/file_cache

request parameter

param type desc require
op string the value must be hash, other value you can refer to #37484 yes
value string the input you want to calc hash yes

response

if success

param type desc
hash string the hash value of your input

if fail

param type desc
status string error status
msg string error message

example

case 1

curl  '172.100.0.4:8040/api/file_cache?op=hash&value=0200000000000001bf42c14374fff491ffb7c89a1a65c5bb_0.dat'

return

{"hash":"c6a599f453f67f0949f80ad9990fa3dd"}

case 2

curl  '172.100.0.4:8040/api/file_cache?op=hash'

return

{
    "status": "INVALID_ARGUMENT",
    "msg": "missing parameter: value is required"
}

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@yagagagaga
Copy link
Contributor Author

run buildall

Copy link
Contributor

@gavinchou gavinchou left a comment

Choose a reason for hiding this comment

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

Pls add a file cache regression test too.

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.89% (9464/25654)
Line Coverage: 28.25% (77816/275434)
Region Coverage: 27.67% (40198/145300)
Branch Coverage: 24.27% (20424/84142)
Coverage Report: http://coverage.selectdb-in.cc/coverage/a907a6595cefe7dd38ac63fa08d61c4bca1421b0_a907a6595cefe7dd38ac63fa08d61c4bca1421b0/report/index.html

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17573	7344	7307	7307
q2	2034	191	183	183
q3	10462	1256	1407	1256
q4	10315	961	1075	961
q5	7728	3155	3137	3137
q6	239	156	153	153
q7	1039	639	616	616
q8	9452	2024	1982	1982
q9	6810	6261	6263	6261
q10	7015	2516	2504	2504
q11	433	253	252	252
q12	401	229	232	229
q13	17777	3066	3062	3062
q14	295	247	259	247
q15	594	518	522	518
q16	510	443	424	424
q17	992	953	949	949
q18	7369	6798	6803	6798
q19	1378	1238	1231	1231
q20	602	336	332	332
q21	3886	3528	3547	3528
q22	1094	961	965	961
Total cold run time: 107998 ms
Total hot run time: 42891 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7170	7190	7158	7158
q2	335	241	236	236
q3	3092	3088	3002	3002
q4	2112	2136	2061	2061
q5	5645	5618	5681	5618
q6	238	150	149	149
q7	2122	1769	1770	1769
q8	3369	3405	3399	3399
q9	8784	8915	8747	8747
q10	3500	3560	3583	3560
q11	616	488	475	475
q12	862	572	651	572
q13	11198	3208	3230	3208
q14	325	269	289	269
q15	587	532	555	532
q16	517	482	468	468
q17	1796	1728	1730	1728
q18	8365	7936	7936	7936
q19	1788	1742	1744	1742
q20	2116	1875	1881	1875
q21	5844	5559	5589	5559
q22	1134	1040	1033	1033
Total cold run time: 71515 ms
Total hot run time: 61096 ms

@yagagagaga
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.91% (9473/25663)
Line Coverage: 28.28% (77911/275501)
Region Coverage: 27.69% (40241/145328)
Branch Coverage: 24.29% (20442/84158)
Coverage Report: http://coverage.selectdb-in.cc/coverage/07521be3ad4014ac787354314521173bcebd252a_07521be3ad4014ac787354314521173bcebd252a/report/index.html

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18186	7359	7305	7305
q2	2600	213	186	186
q3	11624	1396	1383	1383
q4	10715	956	1124	956
q5	7849	3232	3186	3186
q6	245	155	161	155
q7	1057	665	643	643
q8	9447	2016	1986	1986
q9	6740	6286	6296	6286
q10	7023	2487	2490	2487
q11	431	251	256	251
q12	415	235	232	232
q13	17771	2999	3027	2999
q14	287	247	256	247
q15	590	538	531	531
q16	509	423	421	421
q17	985	939	943	939
q18	7384	6765	6775	6765
q19	1376	1231	1227	1227
q20	582	352	331	331
q21	3890	3527	3510	3510
q22	1050	999	972	972
Total cold run time: 110756 ms
Total hot run time: 42998 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7146	7184	7133	7133
q2	344	230	233	230
q3	2929	2856	2946	2856
q4	1936	1946	1963	1946
q5	5433	5408	5405	5405
q6	235	143	145	143
q7	2043	1658	1656	1656
q8	3254	3297	3302	3297
q9	8390	8415	8329	8329
q10	3394	3449	3458	3449
q11	581	459	486	459
q12	774	569	565	565
q13	6097	3081	3062	3062
q14	307	262	277	262
q15	572	519	520	519
q16	480	455	441	441
q17	1746	1715	1674	1674
q18	7964	7702	7503	7503
q19	1719	1702	1680	1680
q20	2059	1788	1812	1788
q21	5655	5310	5378	5310
q22	1096	974	1020	974
Total cold run time: 64154 ms
Total hot run time: 58681 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 194950 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 07521be3ad4014ac787354314521173bcebd252a, data reload: false

query1	914	380	384	380
query2	6478	1819	1774	1774
query3	6658	210	220	210
query4	25736	24209	24008	24008
query5	5079	564	528	528
query6	285	191	175	175
query7	4589	311	308	308
query8	284	236	236	236
query9	8496	2604	2618	2604
query10	465	284	293	284
query11	16260	15644	15484	15484
query12	159	99	102	99
query13	1705	402	394	394
query14	11678	6709	6537	6537
query15	212	179	186	179
query16	7310	484	462	462
query17	1572	584	584	584
query18	1741	342	283	283
query19	193	148	142	142
query20	120	111	112	111
query21	215	108	104	104
query22	4298	4217	4335	4217
query23	34481	33621	33866	33621
query24	9750	3116	3109	3109
query25	650	386	387	386
query26	1165	159	153	153
query27	2681	282	283	282
query28	6801	2090	2086	2086
query29	880	420	411	411
query30	305	164	153	153
query31	984	757	787	757
query32	104	56	56	56
query33	729	300	287	287
query34	908	488	477	477
query35	884	723	761	723
query36	1063	899	883	883
query37	164	91	83	83
query38	4050	3945	4009	3945
query39	1450	1400	1387	1387
query40	208	117	113	113
query41	49	47	50	47
query42	119	100	96	96
query43	482	439	437	437
query44	1253	796	770	770
query45	199	167	170	167
query46	1125	846	864	846
query47	1887	1808	1827	1808
query48	368	292	291	291
query49	1120	492	449	449
query50	912	434	446	434
query51	7068	6910	6826	6826
query52	102	89	87	87
query53	262	185	184	184
query54	798	469	467	467
query55	79	76	76	76
query56	281	270	271	270
query57	1209	1091	1107	1091
query58	247	242	240	240
query59	2959	3014	2674	2674
query60	302	276	280	276
query61	105	104	103	103
query62	931	663	660	660
query63	258	190	189	189
query64	5303	694	695	694
query65	3263	3174	3222	3174
query66	1406	294	305	294
query67	16388	15562	15528	15528
query68	3189	874	866	866
query69	438	329	327	327
query70	1176	1164	1148	1148
query71	355	338	335	335
query72	5979	3416	3387	3387
query73	597	587	582	582
query74	9223	9060	9033	9033
query75	3126	3014	3012	3012
query76	1923	851	848	848
query77	433	407	402	402
query78	9539	9252	9279	9252
query79	923	890	870	870
query80	853	820	819	819
query81	458	267	267	267
query82	266	258	264	258
query83	198	186	194	186
query84	244	107	108	107
query85	658	425	405	405
query86	325	312	321	312
query87	4418	4413	4350	4350
query88	4170	4120	4129	4120
query89	374	367	372	367
query90	1258	323	318	318
query91	129	130	122	122
query92	79	74	78	74
query93	1055	1049	1046	1046
query94	530	379	400	379
query95	454	430	421	421
query96	482	474	472	472
query97	3165	3142	3116	3116
query98	229	238	246	238
query99	1574	1330	1318	1318
Total cold run time: 277999 ms
Total hot run time: 194950 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.04
query2	0.07	0.04	0.04
query3	0.23	0.05	0.05
query4	1.68	0.06	0.07
query5	0.49	0.49	0.50
query6	1.13	0.73	0.72
query7	0.03	0.02	0.02
query8	0.05	0.04	0.04
query9	0.56	0.52	0.50
query10	0.57	0.59	0.56
query11	0.16	0.12	0.12
query12	0.16	0.13	0.12
query13	0.63	0.61	0.61
query14	1.47	1.45	1.41
query15	0.91	0.89	0.88
query16	0.36	0.36	0.36
query17	1.04	1.01	1.02
query18	0.22	0.22	0.21
query19	1.89	1.89	1.85
query20	0.02	0.01	0.01
query21	15.40	0.69	0.66
query22	3.80	7.82	1.36
query23	18.01	1.33	1.34
query24	2.27	0.23	0.23
query25	0.18	0.09	0.08
query26	0.29	0.19	0.19
query27	0.09	0.09	0.08
query28	13.17	1.15	1.10
query29	12.58	3.32	3.31
query30	0.25	0.06	0.07
query31	2.85	0.42	0.42
query32	3.23	0.50	0.50
query33	3.06	3.03	3.03
query34	15.46	4.32	4.28
query35	4.34	4.33	4.35
query36	0.69	0.49	0.50
query37	0.19	0.16	0.16
query38	0.17	0.16	0.15
query39	0.05	0.04	0.03
query40	0.17	0.14	0.13
query41	0.10	0.05	0.05
query42	0.06	0.05	0.05
query43	0.05	0.04	0.04
Total cold run time: 108.17 s
Total hot run time: 31.16 s

@yagagagaga
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.31% (9588/25695)
Line Coverage: 28.70% (79217/276041)
Region Coverage: 28.17% (41031/145651)
Branch Coverage: 24.80% (20911/84308)
Coverage Report: http://coverage.selectdb-in.cc/coverage/2a92290924fafa6d07592f6ce37d207b6c420564_2a92290924fafa6d07592f6ce37d207b6c420564/report/index.html

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17695	7446	7330	7330
q2	2685	163	159	159
q3	11202	1159	1189	1159
q4	10438	801	732	732
q5	8103	3106	3122	3106
q6	241	155	149	149
q7	1007	624	608	608
q8	9479	2057	2067	2057
q9	6786	6384	6365	6365
q10	6989	2253	2265	2253
q11	427	258	247	247
q12	405	220	211	211
q13	17780	2954	3027	2954
q14	234	207	207	207
q15	562	528	506	506
q16	660	633	623	623
q17	994	810	799	799
q18	7384	6631	6649	6631
q19	1406	945	972	945
q20	608	288	288	288
q21	4094	3291	3241	3241
q22	1117	1027	991	991
Total cold run time: 110296 ms
Total hot run time: 41561 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7259	7216	7193	7193
q2	327	227	226	226
q3	2914	2769	2770	2769
q4	1971	1700	1742	1700
q5	5358	5405	5432	5405
q6	226	143	145	143
q7	2118	1687	1707	1687
q8	3168	3294	3278	3278
q9	8400	8378	8406	8378
q10	3386	3365	3334	3334
q11	573	479	468	468
q12	773	579	566	566
q13	4460	2973	3036	2973
q14	306	257	255	255
q15	568	522	512	512
q16	681	668	647	647
q17	1761	1575	1511	1511
q18	7630	7279	7341	7279
q19	1684	1606	1479	1479
q20	2026	1826	1801	1801
q21	5352	5198	5188	5188
q22	1123	1044	1001	1001
Total cold run time: 62064 ms
Total hot run time: 57793 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 189420 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 2a92290924fafa6d07592f6ce37d207b6c420564, data reload: false

query1	953	372	361	361
query2	6511	2055	1995	1995
query3	6706	215	225	215
query4	34332	23365	23507	23365
query5	4397	464	452	452
query6	254	168	167	167
query7	4631	298	310	298
query8	271	208	204	204
query9	9818	2605	2615	2605
query10	442	264	270	264
query11	18314	15111	15194	15111
query12	150	96	97	96
query13	1617	432	393	393
query14	10110	6819	7398	6819
query15	261	167	190	167
query16	7994	451	469	451
query17	1670	567	560	560
query18	1848	324	301	301
query19	351	146	148	146
query20	122	107	106	106
query21	212	107	103	103
query22	4472	4134	4247	4134
query23	34660	33889	33808	33808
query24	11218	2852	2804	2804
query25	625	401	411	401
query26	1196	161	160	160
query27	2787	291	281	281
query28	8032	2435	2406	2406
query29	836	421	422	421
query30	322	163	158	158
query31	1014	771	788	771
query32	94	58	57	57
query33	779	295	296	295
query34	960	509	483	483
query35	904	741	743	741
query36	1067	929	949	929
query37	161	94	82	82
query38	4064	3954	3983	3954
query39	1474	1449	1409	1409
query40	199	100	96	96
query41	52	47	48	47
query42	112	96	93	93
query43	526	480	485	480
query44	1257	816	781	781
query45	199	167	163	163
query46	1140	753	780	753
query47	1917	1809	1802	1802
query48	458	378	387	378
query49	1151	408	402	402
query50	806	414	413	413
query51	7032	6957	7022	6957
query52	98	91	86	86
query53	251	182	185	182
query54	1283	470	475	470
query55	76	77	79	77
query56	296	257	263	257
query57	1220	1088	1118	1088
query58	248	278	242	242
query59	3108	2932	2865	2865
query60	293	266	286	266
query61	127	120	126	120
query62	834	660	657	657
query63	220	211	180	180
query64	5262	619	612	612
query65	3332	3156	3174	3156
query66	1392	295	289	289
query67	15749	15418	15369	15369
query68	4828	578	566	566
query69	463	290	311	290
query70	1196	1148	1126	1126
query71	337	275	273	273
query72	6376	4025	4019	4019
query73	752	331	347	331
query74	9540	8837	9038	8837
query75	3391	2624	2603	2603
query76	2913	890	923	890
query77	406	284	324	284
query78	9692	9165	9034	9034
query79	1074	550	542	542
query80	765	432	437	432
query81	573	234	235	234
query82	366	142	139	139
query83	205	140	151	140
query84	242	77	78	77
query85	1183	288	273	273
query86	384	313	299	299
query87	4502	4329	4329	4329
query88	3834	2357	2342	2342
query89	383	289	279	279
query90	1954	194	194	194
query91	175	143	145	143
query92	67	47	47	47
query93	1453	547	527	527
query94	925	291	293	291
query95	349	246	246	246
query96	620	279	276	276
query97	3242	3114	3128	3114
query98	218	198	200	198
query99	1483	1292	1291	1291
Total cold run time: 298158 ms
Total hot run time: 189420 ms

@doris-robot
Copy link

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

query1	0.05	0.04	0.04
query2	0.06	0.03	0.03
query3	0.23	0.06	0.06
query4	1.64	0.10	0.11
query5	0.49	0.49	0.51
query6	1.13	0.73	0.72
query7	0.02	0.01	0.02
query8	0.04	0.03	0.03
query9	0.57	0.50	0.49
query10	0.55	0.58	0.54
query11	0.14	0.11	0.11
query12	0.14	0.11	0.10
query13	0.61	0.60	0.59
query14	2.98	3.10	2.96
query15	0.89	0.82	0.82
query16	0.38	0.38	0.39
query17	1.01	1.01	1.02
query18	0.21	0.21	0.20
query19	1.93	1.88	2.02
query20	0.01	0.01	0.01
query21	15.38	0.59	0.58
query22	2.46	2.27	2.18
query23	17.22	0.87	0.81
query24	2.91	1.19	1.23
query25	0.17	0.12	0.04
query26	0.46	0.15	0.15
query27	0.05	0.06	0.04
query28	10.44	1.10	1.06
query29	12.53	3.29	3.24
query30	0.24	0.06	0.06
query31	2.89	0.38	0.36
query32	3.28	0.46	0.46
query33	3.01	3.01	3.03
query34	16.80	4.37	4.39
query35	4.44	4.43	4.51
query36	0.66	0.47	0.49
query37	0.09	0.05	0.05
query38	0.05	0.03	0.03
query39	0.04	0.02	0.02
query40	0.15	0.12	0.13
query41	0.08	0.02	0.02
query42	0.03	0.02	0.03
query43	0.03	0.03	0.02
Total cold run time: 106.49 s
Total hot run time: 33.3 s

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Sep 20, 2024
Copy link
Contributor

PR approved by at least one committer and no changes requested.

Copy link
Contributor

PR approved by anyone and no changes requested.

@gavinchou gavinchou merged commit 7348e73 into apache:master Sep 23, 2024
24 of 29 checks passed
gavinchou pushed a commit that referenced this pull request Sep 23, 2024
…40831)

## Proposed changes

Add a http action which can calculate its hash value based on the path you input. It's useful when you debug.

### API
```http
GET /api/file_cache
```

### request parameter

|param|type  |desc                                                          |require|
|:--- |:---  |:---                                                          |:---   |
|op   |string|the value must be `hash`, other value you can refer to #37484 |yes    |
|value|string|the input you want to calc hash                               |yes    |

### response

if success
|param|type  |desc                        |
|:--- |:---  |:---                        |
|hash |string|the hash value of your input|

if fail
|param |type  |desc         |
|:---  |:---  |:---         |
|status|string|error status |
|msg   |string|error message|

### example

#### case 1

```bash
curl  '172.100.0.4:8040/api/file_cache?op=hash&value=0200000000000001bf42c14374fff491ffb7c89a1a65c5bb_0.dat'
```

return
```json
{"hash":"c6a599f453f67f0949f80ad9990fa3dd"}
```

#### case 2

```bash
curl  '172.100.0.4:8040/api/file_cache?op=hash'
```

return
```json
{
    "status": "INVALID_ARGUMENT",
    "msg": "missing parameter: value is required"
}
```
gavinchou pushed a commit that referenced this pull request Nov 7, 2024
…1037)

## Proposed changes

Add a http action which is useful when you debug.

### API
```http
GET /api/file_cache
```

### request parameter

#### request parameter1

|param|type|desc|require|
|:---|:---|:---|:---|
|op|string|the value must be `list_cache`, other value you can refer to
#40831 #37484 |yes|
|value|string|the segment file name |yes|

#### request parameter2

|param|type|desc|require|
|:---|:---|:---|:---|
|op|string|the value must be `clear`, other value you can refer to
#40831 #37484 |yes|
|value|string|the segment file name |yes|
|sync|bool|clean local cache in sync |no|

### response

#### response1

if success
|param|type|desc|
|:---|:---|:---|
||array|return the segment file cache in local path|

if fail
|param|type|desc|
|:---|:---|:---|
||array|empty array|

#### response2

if success
|param|type|desc|
|:---|:---|:---|
|status|string||
|msg|string||

### example

#### case 1

```bash
curl  '172.100.0.4:8040/api/file_cache?op=list_cache&value=0200000000000001bf42c14374fff491ffb7c89a1a65c5bb_0.dat'
```

return
```json
["/opt/doris/be/file_cache/c6a/c6a599f453f67f0949f80ad9990fa3dd/0"]
```

#### case 2

```bash
curl '127.0.0.1:8040/api/file_cache?op=clear&sync=true&value=0200000000000001284b68fea3dcfe8a83e65cd88426b081_0.dat'
```

return
```json
{
    "status": "OK",
    "msg": "OK"
}
```
yagagagaga added a commit to yagagagaga/doris that referenced this pull request Nov 7, 2024
…ache#41037)

## Proposed changes

Add a http action which is useful when you debug.

### API
```http
GET /api/file_cache
```

### request parameter

#### request parameter1

|param|type|desc|require|
|:---|:---|:---|:---|
|op|string|the value must be `list_cache`, other value you can refer to
apache#40831 apache#37484 |yes|
|value|string|the segment file name |yes|

#### request parameter2

|param|type|desc|require|
|:---|:---|:---|:---|
|op|string|the value must be `clear`, other value you can refer to
apache#40831 apache#37484 |yes|
|value|string|the segment file name |yes|
|sync|bool|clean local cache in sync |no|

### response

#### response1

if success
|param|type|desc|
|:---|:---|:---|
||array|return the segment file cache in local path|

if fail
|param|type|desc|
|:---|:---|:---|
||array|empty array|

#### response2

if success
|param|type|desc|
|:---|:---|:---|
|status|string||
|msg|string||

### example

#### case 1

```bash
curl  '172.100.0.4:8040/api/file_cache?op=list_cache&value=0200000000000001bf42c14374fff491ffb7c89a1a65c5bb_0.dat'
```

return
```json
["/opt/doris/be/file_cache/c6a/c6a599f453f67f0949f80ad9990fa3dd/0"]
```

#### case 2

```bash
curl '127.0.0.1:8040/api/file_cache?op=clear&sync=true&value=0200000000000001284b68fea3dcfe8a83e65cd88426b081_0.dat'
```

return
```json
{
    "status": "OK",
    "msg": "OK"
}
```

(cherry picked from commit 99d0748)
gavinchou pushed a commit that referenced this pull request Nov 14, 2024
…and clear (#41037) (#43412)

## Proposed changes

Add a http action which is useful when you debug.

### API
```http
GET /api/file_cache
```

### request parameter

#### request parameter1

|param|type|desc|require|
|:---|:---|:---|:---|
|op|string|the value must be `list_cache`, other value you can refer to
#40831 #37484 |yes|
|value|string|the segment file name |yes|

#### request parameter2

|param|type|desc|require|
|:---|:---|:---|:---|
|op|string|the value must be `clear`, other value you can refer to
#40831 #37484 |yes|
|value|string|the segment file name |yes|
|sync|bool|clean local cache in sync |no|

### response

#### response1

if success
|param|type|desc|
|:---|:---|:---|
||array|return the segment file cache in local path|

if fail
|param|type|desc|
|:---|:---|:---|
||array|empty array|

#### response2

if success
|param|type|desc|
|:---|:---|:---|
|status|string||
|msg|string||

### example

#### case 1

```bash
curl  '172.100.0.4:8040/api/file_cache?op=list_cache&value=0200000000000001bf42c14374fff491ffb7c89a1a65c5bb_0.dat'
```

return
```json
["/opt/doris/be/file_cache/c6a/c6a599f453f67f0949f80ad9990fa3dd/0"]
```

#### case 2

```bash
curl '127.0.0.1:8040/api/file_cache?op=clear&sync=true&value=0200000000000001284b68fea3dcfe8a83e65cd88426b081_0.dat'
```

return
```json
{
    "status": "OK",
    "msg": "OK"
}
```

(cherry picked from commit 99d0748)
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. dev/3.0.2-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants