mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-25 09:20:40 +00:00
fix: physical table statistics info (#4975)
* fix: physical table statistics info * refactor: is_physical_table * fix: remove file
This commit is contained in:
@@ -38,6 +38,7 @@ use crate::metadata::{
|
||||
InvalidRegionOptionChangeRequestSnafu, InvalidRegionRequestSnafu, MetadataError,
|
||||
RegionMetadata, Result,
|
||||
};
|
||||
use crate::metric_engine_consts::PHYSICAL_TABLE_METADATA_KEY;
|
||||
use crate::mito_engine_options::{
|
||||
TTL_KEY, TWCS_MAX_ACTIVE_WINDOW_FILES, TWCS_MAX_ACTIVE_WINDOW_RUNS,
|
||||
TWCS_MAX_INACTIVE_WINDOW_FILES, TWCS_MAX_INACTIVE_WINDOW_RUNS, TWCS_MAX_OUTPUT_FILE_SIZE,
|
||||
@@ -306,6 +307,11 @@ impl RegionCreateRequest {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Returns true when the region belongs to the metric engine's physical table.
|
||||
pub fn is_physical_table(&self) -> bool {
|
||||
self.options.contains_key(PHYSICAL_TABLE_METADATA_KEY)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
@@ -324,6 +330,13 @@ pub struct RegionOpenRequest {
|
||||
pub skip_wal_replay: bool,
|
||||
}
|
||||
|
||||
impl RegionOpenRequest {
|
||||
/// Returns true when the region belongs to the metric engine's physical table.
|
||||
pub fn is_physical_table(&self) -> bool {
|
||||
self.options.contains_key(PHYSICAL_TABLE_METADATA_KEY)
|
||||
}
|
||||
}
|
||||
|
||||
/// Close region request.
|
||||
#[derive(Debug)]
|
||||
pub struct RegionCloseRequest {}
|
||||
|
||||
Reference in New Issue
Block a user