diff --git a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/pipe/PipeConsensus.java b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/pipe/PipeConsensus.java index ce5acf73cc3a..38d34acb2fd6 100644 --- a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/pipe/PipeConsensus.java +++ b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/pipe/PipeConsensus.java @@ -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); diff --git a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/pipe/PipeConsensusServerImpl.java b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/pipe/PipeConsensusServerImpl.java index b085abbd64b2..b5fe4e8bb4ee 100644 --- a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/pipe/PipeConsensusServerImpl.java +++ b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/pipe/PipeConsensusServerImpl.java @@ -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; @@ -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; } }