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


##########
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:
   Could we batch keys with different batch sizes depending on the MPU schema 
version?



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