refactor(mito2): implement RegionManifestManager (#1984)

* finilise manager and related API

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* impl manifest initialize and update

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* more test and utils

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* resolve CR comments

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

---------

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
Ruihang Xia
2023-07-18 22:03:35 +08:00
committed by GitHub
parent 37dad206f4
commit 8bea853954
10 changed files with 544 additions and 233 deletions

View File

@@ -16,6 +16,8 @@
pub mod action;
mod storage;
use std::sync::atomic::AtomicU64;
use async_trait::async_trait;
use common_error::ext::ErrorExt;
use serde::de::DeserializeOwned;
@@ -25,6 +27,7 @@ use crate::manifest::action::{ProtocolAction, ProtocolVersion};
pub use crate::manifest::storage::*;
pub type ManifestVersion = u64;
pub type AtomicManifestVersion = AtomicU64;
pub const MIN_VERSION: u64 = 0;
pub const MAX_VERSION: u64 = u64::MAX;