Skip to content

Commit

Permalink
feat(mito): add CatchupRequest
Browse files Browse the repository at this point in the history
feat: reopen region before replay if need
  • Loading branch information
WenyXu committed Dec 20, 2023
1 parent 5e012ec commit 0da0b6a
Show file tree
Hide file tree
Showing 18 changed files with 632 additions and 25 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ git = "https://github.com/GreptimeTeam/greptime-meter.git"
rev = "abbd357c1e193cd270ea65ee7652334a150b628f"

[profile.dev]
debug = 1

[profile.release]
debug = 1
Expand Down
3 changes: 2 additions & 1 deletion src/datanode/src/region_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,8 @@ impl RegionServerInner {
| RegionRequest::Alter(_)
| RegionRequest::Flush(_)
| RegionRequest::Compact(_)
| RegionRequest::Truncate(_) => RegionChange::None,
| RegionRequest::Truncate(_)
| RegionRequest::Catchup(_) => RegionChange::None,
};

let engine = match &region_change {
Expand Down
2 changes: 2 additions & 0 deletions src/metric-engine/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ impl RegionEngine for MetricEngine {
RegionRequest::Flush(_) => todo!(),
RegionRequest::Compact(_) => todo!(),
RegionRequest::Truncate(_) => todo!(),
/// It always Ok(0), all data is latest.
RegionRequest::Catchup(_) => Ok(0),
};

result.map_err(BoxedError::new)
Expand Down
2 changes: 2 additions & 0 deletions src/mito2/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ mod alter_test;
#[cfg(test)]
mod basic_test;
#[cfg(test)]
mod catchup_test;
#[cfg(test)]
mod close_test;
#[cfg(test)]
mod compaction_test;
Expand Down
Loading

0 comments on commit 0da0b6a

Please sign in to comment.