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 Jun 25, 2024
1 parent 3e97a49 commit d57668e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/meta-srv/src/region/supervisor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,16 @@ impl RegionSupervisor {
datanode_id: DatanodeId,
region_id: RegionId,
) -> Result<()> {
let from_peer = self
.peer_lookup
.datanode(cluster_id, datanode_id)
.await
.context(error::LookupPeerSnafu {
peer_id: datanode_id,
})?
.context(error::PeerUnavailableSnafu {
peer_id: datanode_id,
})?;
let mut peers = self
.selector
.select(
Expand All @@ -318,16 +328,6 @@ impl RegionSupervisor {
)
.await?;
let to_peer = peers.remove(0);
let from_peer = self
.peer_lookup
.datanode(cluster_id, datanode_id)
.await
.context(error::LookupPeerSnafu {
peer_id: datanode_id,
})?
.context(error::PeerUnavailableSnafu {
peer_id: datanode_id,
})?;
let task = RegionMigrationProcedureTask {
cluster_id,
region_id,
Expand Down

0 comments on commit d57668e

Please sign in to comment.