Skip to content

Commit

Permalink
ignore exception when region migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Pengzna committed Dec 15, 2024
1 parent f62d058 commit 6623278
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,8 @@ public void removeRemotePeer(ConsensusGroupId groupId, Peer peer) throws Consens
LOGGER.info("[{}] wait {} to release all resource...", CLASS_NAME, peer);
impl.waitReleaseAllRegionRelatedResource(peer);
} catch (ConsensusGroupModifyPeerException e) {
LOGGER.error(
"Remove remote peer failed, may because remote peer is down or other reasons", e);
throw new ConsensusException(e);
}
KillPoint.setKillPoint(IoTConsensusRemovePeerCoordinatorKillPoints.FINISH);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -553,11 +553,20 @@ public void waitPeersToTargetPeerTransmissionCompleted(Peer targetPeer)
isTransmissionCompleted = true;
for (Peer peer : otherPeers) {
if (!peer.equals(targetPeer)) {
isTransmissionCompleted &=
isRemotePeerConsensusPipesTransmissionCompleted(
peer,
Collections.singletonList(new ConsensusPipeName(peer, targetPeer).toString()),
isFirstCheckForOtherPeers);
try {
isTransmissionCompleted &=
isRemotePeerConsensusPipesTransmissionCompleted(
peer,
Collections.singletonList(
new ConsensusPipeName(peer, targetPeer).toString()),
isFirstCheckForOtherPeers);
} catch (Exception e) {
LOGGER.warn(
"{} failed to check remote peer{}'s transmission progress, may because this peer has down. Ignore this exception and move on",
thisNode,
peer,
e);
}
}
}
isFirstCheckForOtherPeers = false;
Expand Down Expand Up @@ -644,7 +653,7 @@ public synchronized boolean isConsensusPipesTransmissionCompleted(
cachedProgressIndex.isAfter(
progressIndexManager.getProgressIndex(new ConsensusPipeName(name))));
} catch (PipeException e) {
LOGGER.info(e.getMessage());
LOGGER.warn(e.getMessage(), e);
return false;
}
}
Expand Down

0 comments on commit 6623278

Please sign in to comment.