denis-chudov commented on a change in pull request #9004:
URL: https://github.com/apache/ignite/pull/9004#discussion_r616690316



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
##########
@@ -536,22 +538,28 @@ else if (!rebalanceFut.isActual(supplyMsg.rebalanceId()))
                 log.debug("Received supply message [" + 
demandRoutineInfo(nodeId, supplyMsg) + ']');
 
             // Check whether there were error during supplying process.
+            Throwable msgExc = null;
+            final GridDhtPartitionTopology top = grp.topology();
+
             if (supplyMsg.classError() != null)
-                errMsg = supplyMsg.classError().getMessage();
+                msgExc = supplyMsg.classError();
             else if (supplyMsg.error() != null)
-                errMsg = supplyMsg.error().getMessage();
+                msgExc = supplyMsg.error();
 
-            if (errMsg != null) {
-                U.warn(log, "Rebalancing routine has failed [" +
-                    demandRoutineInfo(nodeId, supplyMsg) + ", err=" + errMsg + 
']');
+            if (msgExc != null) {
+                GridDhtPartitionMap partMap = top.localPartitionMap();
+                Set<Integer> unstableParts = 
supplyMsg.infos().keySet().stream()

Review comment:
       please add empty line

##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
##########
@@ -536,22 +538,28 @@ else if (!rebalanceFut.isActual(supplyMsg.rebalanceId()))
                 log.debug("Received supply message [" + 
demandRoutineInfo(nodeId, supplyMsg) + ']');
 
             // Check whether there were error during supplying process.
+            Throwable msgExc = null;
+            final GridDhtPartitionTopology top = grp.topology();
+
             if (supplyMsg.classError() != null)
-                errMsg = supplyMsg.classError().getMessage();
+                msgExc = supplyMsg.classError();
             else if (supplyMsg.error() != null)
-                errMsg = supplyMsg.error().getMessage();
+                msgExc = supplyMsg.error();
 
-            if (errMsg != null) {
-                U.warn(log, "Rebalancing routine has failed [" +
-                    demandRoutineInfo(nodeId, supplyMsg) + ", err=" + errMsg + 
']');
+            if (msgExc != null) {
+                GridDhtPartitionMap partMap = top.localPartitionMap();
+                Set<Integer> unstableParts = 
supplyMsg.infos().keySet().stream()
+                    .filter(p -> partMap.get(p) == MOVING)
+                    .collect(Collectors.toSet());
+
+                U.error(log, "Rebalancing routine has failed [" + 
demandRoutineInfo(nodeId, supplyMsg) + "]" +
+                    ", Partitions could be unavailable for reading " + 
S.compact(unstableParts), msgExc);

Review comment:
       According to Ignite code style, such messages should look like `Message 
text [key0=value0, ..., keyN=valueN]` [1]
   I suggest to change message to `Rebalancing routine has failed, some 
partitions could be unavailable for reading [..., unavailablePartitions=[...]]`
   
   [1] 
https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines#CodingGuidelines-StringOutput

##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
##########
@@ -536,22 +538,28 @@ else if (!rebalanceFut.isActual(supplyMsg.rebalanceId()))
                 log.debug("Received supply message [" + 
demandRoutineInfo(nodeId, supplyMsg) + ']');
 
             // Check whether there were error during supplying process.
+            Throwable msgExc = null;
+            final GridDhtPartitionTopology top = grp.topology();

Review comment:
       please add empty line




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to