-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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: list_cache and clear #41037
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
regression-test/suites/cloud_p0/cache/http/test_calc_cache_file_hash.groovy
Outdated
Show resolved
Hide resolved
4d2c05a
to
62ee150
Compare
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
run buidlall |
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
TPC-H: Total hot run time: 41499 ms
|
TeamCity be ut coverage result: |
TPC-DS: Total hot run time: 191663 ms
|
ClickBench: Total hot run time: 33.03 s
|
list what has been cleared, a file list with size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR approved by anyone and no changes requested. |
PR approved by at least one committer and no changes requested. |
…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)
…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)
Proposed changes
Add a http action which is useful when you debug.
API
request parameter
request parameter1
list_cache
, other value you can refer to #40831 #37484request parameter2
clear
, other value you can refer to #40831 #37484response
response1
if success
if fail
response2
if success
example
case 1
curl '172.100.0.4:8040/api/file_cache?op=list_cache&value=0200000000000001bf42c14374fff491ffb7c89a1a65c5bb_0.dat'
return
["/opt/doris/be/file_cache/c6a/c6a599f453f67f0949f80ad9990fa3dd/0"]
case 2
curl '127.0.0.1:8040/api/file_cache?op=clear&sync=true&value=0200000000000001284b68fea3dcfe8a83e65cd88426b081_0.dat'
return