mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2025-12-22 22:20:02 +00:00
refactor!: add enable_read_cache config to support disable read cache explicitly (#6834)
* refactor: add `enable_read_cache` config to support disable read cache explicitly Signed-off-by: zyy17 <zyylsxm@gmail.com> * refactor: if `cache_path` is empty and `enable_read_cache` is true, set the default cache dir Signed-off-by: zyy17 <zyylsxm@gmail.com> * refactor: remove the unessary Option type for `ObjectStorageCacheConfig` Signed-off-by: zyy17 <zyylsxm@gmail.com> * refactor: sanitize cache config in `DatanodeOptions` and `StandaloneOptions` Signed-off-by: zyy17 <zyylsxm@gmail.com> * chore: code review comment Signed-off-by: zyy17 <zyylsxm@gmail.com> * chore: apply code review comments Signed-off-by: zyy17 <zyylsxm@gmail.com> --------- Signed-off-by: zyy17 <zyylsxm@gmail.com>
This commit is contained in:
@@ -212,10 +212,9 @@ pub fn get_test_store_config(store_type: &StorageType) -> (ObjectStoreConfig, Te
|
||||
let mut s3_config = s3_test_config();
|
||||
|
||||
if *store_type == StorageType::S3WithCache {
|
||||
s3_config.cache.cache_path = Some("/tmp/greptimedb_cache".to_string());
|
||||
s3_config.cache.cache_path = "/tmp/greptimedb_cache".to_string();
|
||||
} else {
|
||||
// An empty string means disabling.
|
||||
s3_config.cache.cache_path = Some("".to_string());
|
||||
s3_config.cache.enable_read_cache = false;
|
||||
}
|
||||
|
||||
let builder = S3::from(&s3_config.connection);
|
||||
|
||||
@@ -1594,6 +1594,7 @@ fn drop_lines_with_inconsistent_results(input: String) -> String {
|
||||
"max_background_flushes =",
|
||||
"max_background_compactions =",
|
||||
"max_background_purges =",
|
||||
"enable_read_cache =",
|
||||
];
|
||||
|
||||
input
|
||||
|
||||
Reference in New Issue
Block a user