denis-chudov commented on code in PR #3139:
URL: https://github.com/apache/ignite-3/pull/3139#discussion_r1474700725
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -1830,8 +1832,17 @@ private CompletableFuture<Void> changePeersOnRebalance(
RaftGroupService partGrpSvc =
table.internalTable().partitionRaftGroupService(partId);
return partGrpSvc.refreshAndGetLeaderWithTerm()
+ .exceptionally(throwable -> {
+ if (throwable instanceof TimeoutException) {
+ LOG.info("Node couldn't get the leader within timeout
so change peer is skipped [grp={}].", replicaGrpId);
Review Comment:
```suggestion
LOG.info("Node couldn't get the leader within
timeout so the changing peers is skipped [grp={}].", replicaGrpId);
```
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -1830,8 +1832,17 @@ private CompletableFuture<Void> changePeersOnRebalance(
RaftGroupService partGrpSvc =
table.internalTable().partitionRaftGroupService(partId);
return partGrpSvc.refreshAndGetLeaderWithTerm()
+ .exceptionally(throwable -> {
+ if (throwable instanceof TimeoutException) {
+ LOG.info("Node couldn't get the leader within timeout
so change peer is skipped [grp={}].", replicaGrpId);
+
+ return LeaderWithTerm.NO_LEADER;
+ }
+
+ throw new IgniteInternalException(throwable);
Review Comment:
its deprecated, why just not rethrow? it would make sense if you added some
message
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]