[Enhancement]The page cache can be parameterized by the session variable of fe. (#23981)
This commit is contained in:
@ -352,6 +352,11 @@ public:
|
||||
return _query_options.__isset.skip_delete_bitmap && _query_options.skip_delete_bitmap;
|
||||
}
|
||||
|
||||
bool enable_page_cache() const {
|
||||
return !config::disable_storage_page_cache &&
|
||||
(_query_options.__isset.enable_page_cache && _query_options.enable_page_cache);
|
||||
}
|
||||
|
||||
int partitioned_hash_join_rows_threshold() const {
|
||||
if (!_query_options.__isset.partitioned_hash_join_rows_threshold) {
|
||||
return 0;
|
||||
|
||||
@ -412,9 +412,7 @@ Status NewOlapScanner::_init_tablet_reader_params(
|
||||
}
|
||||
}
|
||||
|
||||
if (!config::disable_storage_page_cache) {
|
||||
_tablet_reader_params.use_page_cache = true;
|
||||
}
|
||||
_tablet_reader_params.use_page_cache = _state->enable_page_cache();
|
||||
|
||||
if (_tablet->enable_unique_key_merge_on_write() && !_state->skip_delete_bitmap()) {
|
||||
_tablet_reader_params.delete_bitmap = &_tablet->tablet_meta()->delete_bitmap();
|
||||
|
||||
@ -340,6 +340,8 @@ public class SessionVariable implements Serializable, Writable {
|
||||
|
||||
public static final String ENABLE_MINIDUMP = "enable_minidump";
|
||||
|
||||
public static final String ENABLE_PAGE_CACHE = "enable_page_cache";
|
||||
|
||||
public static final String MINIDUMP_PATH = "minidump_path";
|
||||
|
||||
public static final String TRACE_NEREIDS = "trace_nereids";
|
||||
@ -1065,6 +1067,15 @@ public class SessionVariable implements Serializable, Writable {
|
||||
@VariableMgr.VarAttr(name = ENABLE_MINIDUMP)
|
||||
public boolean enableMinidump = false;
|
||||
|
||||
|
||||
@VariableMgr.VarAttr(
|
||||
name = ENABLE_PAGE_CACHE,
|
||||
description = {"控制是否启用page cache。默认为 true。",
|
||||
"Controls whether to use page cache. "
|
||||
+ "The default value is true."},
|
||||
needForward = true)
|
||||
public boolean enablePageCache = true;
|
||||
|
||||
@VariableMgr.VarAttr(name = ENABLE_FOLD_NONDETERMINISTIC_FN)
|
||||
public boolean enableFoldNondeterministicFn = false;
|
||||
|
||||
@ -2263,6 +2274,8 @@ public class SessionVariable implements Serializable, Writable {
|
||||
|
||||
tResult.setEnableFileCache(enableFileCache);
|
||||
|
||||
tResult.setEnablePageCache(enablePageCache);
|
||||
|
||||
tResult.setFileCacheBasePath(fileCacheBasePath);
|
||||
|
||||
tResult.setEnableInvertedIndexQuery(enableInvertedIndexQuery);
|
||||
|
||||
@ -245,6 +245,7 @@ struct TQueryOptions {
|
||||
// A seperate flag to indicate whether to enable profile, not
|
||||
// use is_report_success any more
|
||||
84: optional bool enable_profile = false;
|
||||
85: optional bool enable_page_cache = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user