mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-27 10:20:38 +00:00
feat: add delete WAL in drop_region (#1577)
* feat: add delete WAL in drop_region * chore: fix typo err. * feat: mark all SSTs deleted and remove the region from StorageEngine's region map. * test: add test_drop_region for StorageEngine. * chore: make clippy happy * fix: fix conflict * chore: CR. * chore: CR * chore: fix clippy * fix: temp file life time
This commit is contained in:
@@ -54,10 +54,10 @@ pub trait LogStore: Send + Sync + 'static + std::fmt::Debug {
|
||||
) -> Result<SendableEntryStream<Self::Entry, Self::Error>, Self::Error>;
|
||||
|
||||
/// Create a new `Namespace`.
|
||||
async fn create_namespace(&mut self, ns: &Self::Namespace) -> Result<(), Self::Error>;
|
||||
async fn create_namespace(&self, ns: &Self::Namespace) -> Result<(), Self::Error>;
|
||||
|
||||
/// Delete an existing `Namespace` with given ref.
|
||||
async fn delete_namespace(&mut self, ns: &Self::Namespace) -> Result<(), Self::Error>;
|
||||
async fn delete_namespace(&self, ns: &Self::Namespace) -> Result<(), Self::Error>;
|
||||
|
||||
/// List all existing namespaces.
|
||||
async fn list_namespaces(&self) -> Result<Vec<Self::Namespace>, Self::Error>;
|
||||
|
||||
@@ -75,6 +75,8 @@ pub trait Region: Send + Sync + Clone + std::fmt::Debug + 'static {
|
||||
|
||||
async fn close(&self) -> Result<(), Self::Error>;
|
||||
|
||||
async fn drop_region(&self) -> Result<(), Self::Error>;
|
||||
|
||||
fn disk_usage_bytes(&self) -> u64;
|
||||
|
||||
fn region_stat(&self) -> RegionStat {
|
||||
|
||||
Reference in New Issue
Block a user