Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Region Migration] Ignore exception when region migration considering unknown nodes. #14433

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi, why does remove this error log? if is a undeal exception, we can print warn.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use warn log is better

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wangchao316 @OneSizeFitsQuorum thanks for advise! I will fix it in #14455, since this pr is deprecated

"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(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to add this for waitTargetPeerToPeersTransmissionCompleted?

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
Loading