Skip to content

Commit

Permalink
feat: handle the downgrade region instruction (#2855)
Browse files Browse the repository at this point in the history
* feat: handle the downgrade region instruction

* test: add tests for RegionHeartbeatResponseHandler

* refactor: remove unused code
  • Loading branch information
WenyXu authored Dec 5, 2023
1 parent d6ef7a7 commit b3ffe5c
Show file tree
Hide file tree
Showing 8 changed files with 373 additions and 151 deletions.
2 changes: 1 addition & 1 deletion src/common/meta/src/heartbeat/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub struct HeartbeatResponseHandlerContext {
/// HandleControl
///
/// Controls process of handling heartbeat response.
#[derive(PartialEq)]
#[derive(Debug, PartialEq)]
pub enum HandleControl {
Continue,
Done,
Expand Down
2 changes: 1 addition & 1 deletion src/common/meta/src/heartbeat/mailbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ pub struct MessageMeta {
pub from: String,
}

#[cfg(test)]
impl MessageMeta {
#[cfg(any(test, feature = "testing"))]
pub fn new_test(id: u64, subject: &str, to: &str, from: &str) -> Self {
MessageMeta {
id,
Expand Down
2 changes: 2 additions & 0 deletions src/datanode/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ uuid.workspace = true
[dev-dependencies]
axum-test-helper = { git = "https://github.com/sunng87/axum-test-helper.git", branch = "patch-1" }
client.workspace = true
common-meta = { workspace = true, features = ["testing"] }
common-query.workspace = true
common-test-util.workspace = true
datafusion-common.workspace = true
mito2 = { workspace = true, features = ["test"] }
session.workspace = true
Loading

0 comments on commit b3ffe5c

Please sign in to comment.