mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-24 17:00:37 +00:00
perf: close issue 4974 by do not delete columns when drop logical region about 100 times faster (#5561)
* perf: do not delete columns when drop logical region in drop database Signed-off-by: yihong0618 <zouzou0208@gmail.com> * fix: make ci happy Signed-off-by: yihong0618 <zouzou0208@gmail.com> * fix: address review comments Signed-off-by: yihong0618 <zouzou0208@gmail.com> * fix: address some comments Signed-off-by: yihong0618 <zouzou0208@gmail.com> * fix: drop stupid comments by copilot Signed-off-by: yihong0618 <zouzou0208@gmail.com> * chore: minor refactor * chore: minor refactor * chore: update grpetime-proto --------- Signed-off-by: yihong0618 <zouzou0208@gmail.com> Co-authored-by: WenyXu <wenymedia@gmail.com>
This commit is contained in:
@@ -222,7 +222,12 @@ fn make_region_creates(creates: CreateRequests) -> Result<Vec<(RegionId, RegionR
|
||||
|
||||
fn parse_region_drop(drop: DropRequest) -> Result<(RegionId, RegionDropRequest)> {
|
||||
let region_id = drop.region_id.into();
|
||||
Ok((region_id, RegionDropRequest {}))
|
||||
Ok((
|
||||
region_id,
|
||||
RegionDropRequest {
|
||||
fast_path: drop.fast_path,
|
||||
},
|
||||
))
|
||||
}
|
||||
|
||||
fn make_region_drop(drop: DropRequest) -> Result<Vec<(RegionId, RegionRequest)>> {
|
||||
@@ -397,8 +402,10 @@ impl RegionCreateRequest {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct RegionDropRequest {}
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RegionDropRequest {
|
||||
pub fast_path: bool,
|
||||
}
|
||||
|
||||
/// Open region request.
|
||||
#[derive(Debug, Clone)]
|
||||
|
||||
Reference in New Issue
Block a user