feat: Remove store from procedure config (#1489)

* feat(procedure): Add key prefix

* feat: Remove store config from ProcedureConfig

* refactor(procedure): Address review comments

Add proc_path! macro and rename KEY_PREFIX to PROC_PATH

* docs: Update procedure config examples
This commit is contained in:
Yingwen
2023-04-28 22:12:57 +08:00
committed by GitHub
parent 51be35a7b1
commit 0b0b5a10da
10 changed files with 41 additions and 68 deletions

View File

@@ -188,7 +188,6 @@ enum TempDirGuard {
pub struct TestGuard {
_wal_tmp_dir: TempDir,
data_tmp_dir: Option<TempDirGuard>,
_procedure_tmp_dir: TempDir,
}
impl TestGuard {
@@ -207,7 +206,6 @@ pub fn create_tmp_dir_and_datanode_opts(
name: &str,
) -> (DatanodeOptions, TestGuard) {
let wal_tmp_dir = create_temp_dir(&format!("gt_wal_{name}"));
let procedure_tmp_dir = create_temp_dir(&format!("gt_procedure_{name}"));
let (store, data_tmp_dir) = get_test_store_config(&store_type, name);
@@ -221,9 +219,7 @@ pub fn create_tmp_dir_and_datanode_opts(
..Default::default()
},
mode: Mode::Standalone,
procedure: ProcedureConfig::from_file_path(
procedure_tmp_dir.path().to_str().unwrap().to_string(),
),
procedure: ProcedureConfig::default(),
..Default::default()
};
(
@@ -231,7 +227,6 @@ pub fn create_tmp_dir_and_datanode_opts(
TestGuard {
_wal_tmp_dir: wal_tmp_dir,
data_tmp_dir,
_procedure_tmp_dir: procedure_tmp_dir,
},
)
}