swamirishi commented on code in PR #9605:
URL: https://github.com/apache/ozone/pull/9605#discussion_r2672457318


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMDBCheckpointServletInodeBasedXfer.java:
##########
@@ -295,8 +295,10 @@ public void writeDbDataToStream(HttpServletRequest 
request, OutputStream destina
             }
             writeDBToArchive(sstFilesToExclude, getCompactionLogDir(), 
maxTotalSstSize, archiveOutputStream, tmpdir,
                 hardLinkFileMap, false);
-            writeDBToArchive(sstFilesToExclude, sstBackupFiles.stream(), 
maxTotalSstSize, archiveOutputStream, tmpdir,
-                hardLinkFileMap, false);
+            try (Stream<Path> backupFiles = sstBackupFiles.stream()) {
+              writeDBToArchive(sstFilesToExclude, backupFiles, 
maxTotalSstSize, archiveOutputStream, tmpdir,
+                  hardLinkFileMap, false);
+            }

Review Comment:
   yeah just kept it since stream is a closeable and it depends on the List 
implementation actually



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to