Skip to content

Commit

Permalink
chore: apply suggestions from CR
Browse files Browse the repository at this point in the history
  • Loading branch information
WenyXu committed Nov 15, 2023
1 parent 3896bd6 commit f4112f2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/meta-srv/src/procedure/region_migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ pub struct PersistentContext {
from_peer: Peer,
/// The [Peer] of migration destination.
to_peer: Option<Peer>,
/// Closes the migrated region on the `from_peer`.
close_migrated_region: bool,
/// The [RegionId] of migration region.
region_id: RegionId,
}
Expand Down Expand Up @@ -184,7 +182,6 @@ mod tests {
PersistentContext {
from_peer: Peer::empty(1),
to_peer: None,
close_migrated_region: false,
region_id: RegionId::new(1024, 1),
}
}
Expand Down Expand Up @@ -225,7 +222,7 @@ mod tests {

let serialized = procedure.dump().unwrap();

let expected = r#"{"context":{"from_peer":{"id":1,"addr":""},"to_peer":null,"close_migrated_region":false,"region_id":4398046511105},"state":{"region_migration_state":"RegionMigrationStart"}}"#;
let expected = r#"{"context":{"from_peer":{"id":1,"addr":""},"to_peer":null,"region_id":4398046511105},"state":{"region_migration_state":"RegionMigrationStart"}}"#;
assert_eq!(expected, serialized);
}

Expand Down

0 comments on commit f4112f2

Please sign in to comment.