valepakh commented on code in PR #7310:
URL: https://github.com/apache/ignite-3/pull/7310#discussion_r2681621716


##########
modules/rest/src/main/java/org/apache/ignite/internal/rest/deployment/InputStreamCollectorImpl.java:
##########
@@ -54,13 +54,20 @@ public InputStreamCollectorImpl(TempStorage tempStorage) {
 
     @Override
     public void addInputStream(String filename, InputStream is) {
-        collect.put(filename, tempStorage.store(filename, 
is).whenComplete((path, throwable) -> {
-            try {
-                is.close();
-            } catch (IOException e) {
-                LOG.error("Error when closing input stream.", e);
-            }
-        }));
+        if (collect.containsKey(filename)) {
+            closeStream(is);
+            throw new DuplicateFilenamesException("Duplicate filename: " + 
filename);

Review Comment:
   This looks like a different and complicated issue. Let's postpone this to 
future ticket because it seems that there's no easy way to determine whether 
the FS is case-sensitive or not and the code was already using `collect.put` 
which means that we always treat the FS as case-sensitive.



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