Uh oh!
There was an error while loading. Please reload this page.
(cloud-merge) Supports online capacity expansion and contraction - #37484
Conversation
doris-robot
commented
Jul 8, 2024
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
Lchangliang
commented
Jul 8, 2024
run buildall |
| size_t normal_percent, size_t disposable_percent, | ||
| size_t index_percent) { | ||
| io::FileCacheSettings settings; | ||
| if (capacity == 0) return settings; |
There was a problem hiding this comment.
warning: statement should be inside braces [readability-braces-around-statements]
| if (capacity == 0) return settings; | |
| if (capacity == 0) { return settings; | |
| } |
| auto key = io::BlockFileCache::hash("key1"); | ||
| auto key2 = io::BlockFileCache::hash("key2"); | ||
| io::BlockFileCache cache(cache_base_path, settings); | ||
| auto sp = SyncPoint::get_instance(); |
There was a problem hiding this comment.
warning: 'auto sp' can be declared as 'auto *sp' [readability-qualified-auto]
| auto sp = SyncPoint::get_instance(); | |
| s);auto * |
| ; | ||
| EXPECT_EQ(cache._cur_cache_size, 30); |
There was a problem hiding this comment.
warning: statement should be inside braces [readability-braces-around-statements]
| ; | |
| EXPECT_EQ(cache._cur_cache_size, 30); | |
| he) { | |
| ; | |
| } |
doris-robot
commented
Jul 8, 2024
TPC-H: Total hot run time: 41188 ms |
doris-robot
commented
Jul 8, 2024
TPC-DS: Total hot run time: 173877 ms |
doris-robot
commented
Jul 8, 2024
ClickBench: Total hot run time: 31.54 s |
Lchangliang
commented
Jul 9, 2024
run buildall |
doris-robot
commented
Jul 9, 2024
TPC-H: Total hot run time: 39940 ms |
doris-robot
commented
Jul 9, 2024
TPC-DS: Total hot run time: 174181 ms |
doris-robot
commented
Jul 9, 2024
ClickBench: Total hot run time: 30.59 s |
Lchangliang
commented
Jul 25, 2024
run buildall |
doris-robot
commented
Jul 25, 2024
TPC-H: Total hot run time: 40330 ms |
doris-robot
commented
Jul 25, 2024
TPC-DS: Total hot run time: 175753 ms |
doris-robot
commented
Jul 25, 2024
ClickBench: Total hot run time: 31.01 s |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
Lchangliang
commented
Jul 25, 2024
run cloud_p0 |
Lchangliang
commented
Jul 25, 2024
run buildall |
doris-robot
commented
Jul 25, 2024
TPC-H: Total hot run time: 39450 ms |
doris-robot
commented
Jul 25, 2024
TPC-DS: Total hot run time: 172636 ms |
doris-robot
commented
Jul 25, 2024
ClickBench: Total hot run time: 31.08 s |
) 1. Support to reset capacity online via BE HTTP requet 2. Support to analyze cache conf when only get path_name `file_cache_path=[{"path":"xxxx"}]`, we can only specify the path for a file cache instance from now on, if we don't care about the detailed capacity limit ``` # clear file cache curl ip:http_port/api/file_cache?op=clear # reset capacity of a certain instance of file cache curl ip:http_port/api/file_cache?op=reset&capacity=${capacity}&path=${cache_path} curl 127.0.0.1:8060/api/file_cache?op=clear curl 127.0.0.1:8060/api/file_cache?op=reset&capacity=102400000&path=/user/file_cache ```
…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" } ```
…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" } ```
…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" } ```
…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#40831apache#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#40831apache#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)
…che#37484) 1. Support to reset capacity online via BE HTTP requet 2. Support to analyze cache conf when only get path_name `file_cache_path=[{"path":"xxxx"}]`, we can only specify the path for a file cache instance from now on, if we don't care about the detailed capacity limit ``` # clear file cache curl ip:http_port/api/file_cache?op=clear # reset capacity of a certain instance of file cache curl ip:http_port/api/file_cache?op=reset&capacity=${capacity}&path=${cache_path} curl 127.0.0.1:8060/api/file_cache?op=clear curl 127.0.0.1:8060/api/file_cache?op=reset&capacity=102400000&path=/user/file_cache ```
…pache#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 apache#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" } ```
…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#40831apache#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#40831apache#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" } ```
file_cache_path=[{"path":"xxxx"}], we can only specify the path for a file cache instance from now on, if we don't care about the detailed capacity limit