rpuch commented on code in PR #5465:
URL: https://github.com/apache/ignite-3/pull/5465#discussion_r2011723367


##########
modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/ItZoneInMemoryTest.java:
##########
@@ -136,30 +139,61 @@ private static List<CatalogStorageProfileDescriptor> 
extractZoneProfiles(Node no
 
         assertNotNull(zoneDescriptor);
 
-        return zoneDescriptor.storageProfiles().profiles();
+        List<CatalogStorageProfileDescriptor> storageProfilesDescripptors = 
zoneDescriptor.storageProfiles().profiles();
+
+        logStorageProfilesStatusMessage(node, storageProfilesDescripptors);
+
+        return storageProfilesDescripptors;
     }
 
-    private static boolean isRaftLogStorageVolatile(Node node, int zoneId) {
-        RaftServer raftServer = node.raftManager.server();
+    private static void logStorageProfilesStatusMessage(Node node, 
List<CatalogStorageProfileDescriptor> storageProfilesDescriptors) {
+        StringBuilder logMsgBuilder = new StringBuilder("Storage engines that 
are presented: {");

Review Comment:
   ```suggestion
           StringBuilder logMsgBuilder = new StringBuilder("Storage engines 
that are present: {");
   ```



##########
modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/ItZoneInMemoryTest.java:
##########
@@ -136,30 +139,61 @@ private static List<CatalogStorageProfileDescriptor> 
extractZoneProfiles(Node no
 
         assertNotNull(zoneDescriptor);
 
-        return zoneDescriptor.storageProfiles().profiles();
+        List<CatalogStorageProfileDescriptor> storageProfilesDescripptors = 
zoneDescriptor.storageProfiles().profiles();

Review Comment:
   ```suggestion
           List<CatalogStorageProfileDescriptor> storageProfilesDescriptors = 
zoneDescriptor.storageProfiles().profiles();
   ```



##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/NodeImpl.java:
##########
@@ -137,7 +137,7 @@
 import org.apache.ignite.raft.jraft.util.TimeoutStrategy;
 import org.apache.ignite.raft.jraft.util.Utils;
 import 
org.apache.ignite.raft.jraft.util.concurrent.LongHeldDetectingReadWriteLock;
-import org.jetbrains.annotations.Nullable;
+import org.jetbrains.annotations.Nullable;import 
org.jetbrains.annotations.TestOnly;

Review Comment:
   Please put this on a separate line



##########
modules/partition-replicator/src/integrationTest/java/org/apache/ignite/internal/partition/replicator/ItZoneInMemoryTest.java:
##########
@@ -136,30 +139,61 @@ private static List<CatalogStorageProfileDescriptor> 
extractZoneProfiles(Node no
 
         assertNotNull(zoneDescriptor);
 
-        return zoneDescriptor.storageProfiles().profiles();
+        List<CatalogStorageProfileDescriptor> storageProfilesDescripptors = 
zoneDescriptor.storageProfiles().profiles();
+
+        logStorageProfilesStatusMessage(node, storageProfilesDescripptors);
+
+        return storageProfilesDescripptors;
     }
 
-    private static boolean isRaftLogStorageVolatile(Node node, int zoneId) {
-        RaftServer raftServer = node.raftManager.server();
+    private static void logStorageProfilesStatusMessage(Node node, 
List<CatalogStorageProfileDescriptor> storageProfilesDescriptors) {
+        StringBuilder logMsgBuilder = new StringBuilder("Storage engines that 
are presented: {");
+
+        int lastStorageProfileIndex = storageProfilesDescriptors.size() - 1;
 
-        ConcurrentMap<RaftNodeId, RaftGroupService> nodes = 
getFieldValue(raftServer, JraftServerImpl.class, "nodes");
+        for (int storageProfileIdx = 0; storageProfileIdx <= 
lastStorageProfileIndex; storageProfileIdx++) {

Review Comment:
   Please replace manual message building with log.info("... {}", 
expression-using-streams-producing-a-list), it will be a lot shorter and still 
easy to understand. Current code looks too complex. It even looks like you 
tried to optimize it, but performance is not an issue in tests



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to