ibessonov commented on a change in pull request #61:
URL: https://github.com/apache/ignite-3/pull/61#discussion_r591275243



##########
File path: 
modules/configuration/src/main/java/org/apache/ignite/configuration/ConfigurationChanger.java
##########
@@ -195,16 +270,43 @@ public TraversableTreeNode getRootNode(RootKey<?> 
rootKey) {
      * @param fut Future, that must be completed after changes are written to 
the storage.
      */
     private void change0(
-        Map<RootKey<?>, TraversableTreeNode> changes,
+        Map<RootKey<?>, ? extends TraversableTreeNode> changes,
         ConfigurationStorage storage,
         CompletableFuture<?> fut
     ) {
+        StorageRoots roots = storagesRootsMap.get(storage.getClass());
+
         Map<String, Serializable> allChanges = new HashMap<>();
 
-        for (Map.Entry<RootKey<?>, TraversableTreeNode> change : 
changes.entrySet())
-            allChanges.putAll(nodeToFlatMap(change.getKey(), 
getRootNode(change.getKey()), change.getValue()));
+        for (Map.Entry<RootKey<?>, ? extends TraversableTreeNode> entry : 
changes.entrySet()) {
+            RootKey<?> rootKey = entry.getKey();
+            TraversableTreeNode change = entry.getValue();
 
-        StorageRoots roots = storagesRootsMap.get(storage.getClass());
+            // It's important to get the root from "roots" object rather then 
"storageRootMap" or "getRootNode(...)".
+            InnerNode currentRootNode = roots.roots.get(rootKey);

Review comment:
       Done




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to