Skip to content

HDDS-15835. Count incomplete MPU parts in quota repair - #10795

Draft
chihsuan wants to merge 1 commit into
apache:masterfrom
chihsuan:HDDS-15835
Draft

HDDS-15835. Count incomplete MPU parts in quota repair#10795
chihsuan wants to merge 1 commit into
apache:masterfrom
chihsuan:HDDS-15835

Conversation

@chihsuan

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This change updates QuotaRepairTask to include committed parts from incomplete multipart uploads when rebuilding the bucket usedBytes.

Previously, quota repair omitted these parts. A subsequent multipart upload abort released their replicated size, which could cause usedBytes to become negative. The repair task now scans the multipartInfoTable from its checkpoint. It calculates legacy MPU parts using the same replicated-size calculation as abort and uses OMMultipartUploadUtils for split-part MPUs. It adds only usedBytes; MPU parts do not consume usedNamespace.

The change also adds OBS and FSO coverage for legacy and split-parts MPU entries, part replacement, namespace accounting, and aborting after repair.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-15835

How was this patch tested?

  • mvn -pl :ozone-manager test -Dtest=TestQuotaRepairTask -DskipShade -DskipRecon -DskipDocs
  • ./hadoop-ozone/dev-support/checks/checkstyle.sh

Generated-by: Codex (GPT-5)

Copilot AI review requested due to automatic review settings July 18, 2026 03:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chungen0126 chungen0126 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @chihsuan for working on this. I noticed that recalculateUsages includes a batching design. Would it be possible to extend this approach for recalculateMultipartUsages as well?

@chihsuan

Copy link
Copy Markdown
Contributor Author

Thanks @chihsuan for working on this. I noticed that recalculateUsages includes a batching design. Would it be possible to extend this approach for recalculateMultipartUsages as well?

Good point! I initially followed the single-threaded pattern used by the deletedTable scans, assuming that multipartInfoTable would typically remain small. However, processing each MPU can be relatively expensive, especially for split-part MPUs, so batching should help when incomplete MPUs accumulate. I’ll update the PR accordingly.

@chihsuan

Copy link
Copy Markdown
Contributor Author

While working on the batching change, I found two pre-existing bugs in the scan pipeline.

  • the producer can block forever if all workers die
  • an interrupted scan can report partial counts as a successful repair

I filed HDDS-15997 to fix them first in a separate PR, since the MPU scan makes them easier to hit. Putting this PR on hold until HDDS-15997 is merged, then I'll rebase it to keep only the MPU counting.

@github-actions

Copy link
Copy Markdown

This PR has been marked as stale due to 21 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in 7 days.

@spacemonkd

Copy link
Copy Markdown
Contributor

Waiting for #10884 to be merged as per #10795 (comment)

@spacemonkd
spacemonkd marked this pull request as draft August 18, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants