chihsuan commented on code in PR #10795:
URL: https://github.com/apache/ozone/pull/10795#discussion_r3894423556


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/QuotaRepairTask.java:
##########
@@ -554,6 +570,50 @@ private void recalculateDeletedDirNamespace(
     }
   }
 
+  /**
+   * Counts committed parts of incomplete multipart uploads from the active DB 
checkpoint.
+   * Parts of a snapshot's incomplete uploads stay charged to that snapshot's 
own bucket,
+   * so only the active multipartInfoTable is scanned here.
+   */
+  private void recalculateMultipartUsages(
+      OMMetadataManager metadataManager, Map<String, CountPair> mpuCountMap)
+      throws UncheckedIOException, UncheckedExecutionException {
+    try (Table.KeyValueIterator<String, OmMultipartKeyInfo> keyIter
+        = metadataManager.getMultipartInfoTable().iterator()) {
+      scanTableInBatches(executor, keyIter, "Multipart upload usages", 
MPU_BATCH_SIZE,
+          kv -> extractMultipartCount(kv, mpuCountMap, metadataManager));

Review Comment:
   Good question! @chungen0126 We could do that, though making it depend on the 
schema would also require changing the shared scan method. To see how it 
affects, I also ran a quick local benchmark, and the batch size didn't seem to 
change the speed. So I'd lean towards keeping it as is. But happy to change it 
in this PR if you think it's worth it.



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