smengcl commented on code in PR #5014:
URL: https://github.com/apache/ozone/pull/5014#discussion_r1259002503


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMDBCheckpointServlet.java:
##########
@@ -251,13 +265,22 @@ private void processDir(Path dir, Set<Path> copyFiles,
             LOG.debug("Skipping unneeded file: " + file);
             continue;
           }
-          processDir(file, copyFiles, hardLinkFiles, toExcludeFiles,
-              snapshotPaths, excluded);
+          if (!processDir(file, copyFiles, hardLinkFiles, toExcludeFiles,
+                          snapshotPaths, excluded, copySize)) {
+            return false;
+          }
         } else {
-          processFile(file, copyFiles, hardLinkFiles, toExcludeFiles, 
excluded);
+          long fileSize = processFile(file, copyFiles, hardLinkFiles,
+              toExcludeFiles, excluded);
+          if (copySize.get() + fileSize > maxTotalSstSize) {
+            return false;

Review Comment:
   Hmm. What happens if there is one single huge SST file (exceeding 100 MB) in 
the DB? In that case will that SST file ever be included in the tarball?
   
   It might happen if some SST goes deep down in [compaction 
level](https://github.com/facebook/rocksdb/wiki/Leveled-Compaction#:~:text=exponentially%20increasing).
 (or when SST compression is disabled, which shouldn't happen in production, 
but can be used for testing)



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