nizhikov commented on code in PR #12642:
URL: https://github.com/apache/ignite/pull/12642#discussion_r2803796473


##########
modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java:
##########
@@ -2173,6 +2186,28 @@ private DiscoCache resolveDiscoCache(int grpId, 
AffinityTopologyVersion topVer)
         return cache;
     }
 
+    /**
+     * Extracts WAL mode from marshalled Data Storage Configuration of Cluster 
node
+     * @param n Cluster node
+     * @return WAL mode stored in dsCfg or {@code null} if unmarshalling 
failed or got null dsCfg
+     */
+    private WALMode nodeWalMode(ClusterNode n) {
+        Object dsCfgBytes = 
n.attribute(IgniteNodeAttributes.ATTR_DATA_STORAGE_CONFIG);
+        try {
+            if (dsCfgBytes instanceof byte[]) {
+                DataStorageConfiguration dsCfg = 
ctx.marshallerContext().jdkMarshaller().unmarshal(
+                        (byte[])dsCfgBytes, 
U.resolveClassLoader(ctx.config()));
+
+                if (dsCfg != null)
+                    return dsCfg.getWalMode();
+            }
+        }
+        catch (IgniteCheckedException e) {
+            U.error(log, "Failed to unmarshal data storage configuration 
[remoteNode=" + n + "]", e);
+        }

Review Comment:
   Empty line after



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

Reply via email to