mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-05 21:02:58 +00:00
refactor: add region_dir in CompactionRegion (#4187)
This commit is contained in:
@@ -276,6 +276,7 @@ impl CompactionScheduler {
|
||||
|
||||
let compaction_region = CompactionRegion {
|
||||
region_id,
|
||||
region_dir: access_layer.region_dir().to_string(),
|
||||
current_version: current_version.clone(),
|
||||
region_options: current_version.options.clone(),
|
||||
engine_config: engine_config.clone(),
|
||||
|
||||
@@ -54,6 +54,7 @@ use crate::sst::parquet::WriteOptions;
|
||||
pub struct CompactionRegion {
|
||||
pub region_id: RegionId,
|
||||
pub region_options: RegionOptions,
|
||||
pub region_dir: String,
|
||||
|
||||
pub(crate) engine_config: Arc<MitoConfig>,
|
||||
pub(crate) region_metadata: RegionMetadataRef,
|
||||
@@ -163,14 +164,15 @@ pub async fn open_compaction_region(
|
||||
};
|
||||
|
||||
Ok(CompactionRegion {
|
||||
region_options: region_options.clone(),
|
||||
manifest_ctx,
|
||||
access_layer,
|
||||
current_version,
|
||||
region_id: req.region_id,
|
||||
cache_manager: Arc::new(CacheManager::default()),
|
||||
region_options: region_options.clone(),
|
||||
region_dir: req.region_dir.clone(),
|
||||
engine_config: Arc::new(mito_config.clone()),
|
||||
region_metadata: region_metadata.clone(),
|
||||
cache_manager: Arc::new(CacheManager::default()),
|
||||
access_layer,
|
||||
manifest_ctx,
|
||||
current_version,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user