dmitrievanthony commented on a change in pull request #6001: IGNITE-11137: 
IgniteModelStorage improvements for IgniteModel and SQL functionality
URL: https://github.com/apache/ignite/pull/6001#discussion_r253054054
 
 

 ##########
 File path: 
modules/ml/src/main/java/org/apache/ignite/ml/inference/IgniteModelStorageUtil.java
 ##########
 @@ -125,13 +161,30 @@ private static void saveModelDescriptorStorage(String 
name, UUID mdlId) {
         Ignite ignite = Ignition.ignite();
 
         ModelDescriptorStorage descStorage = new 
ModelDescriptorStorageFactory().getModelDescriptorStorage(ignite);
-        descStorage.put(name, new ModelDescriptor(
-            name,
+
+        boolean saved = descStorage.putIfAbsent(name, new ModelDescriptor(
+            mdlId.toString(),
             null,
             new ModelSignature(null, null, null),
             new ModelStorageModelReader(IGNITE_MDL_FOLDER + "/" + mdlId),
             new IgniteModelParser<>()
         ));
+
+        if (!saved)
 
 Review comment:
   I've updated javadoc.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to