Skip to content

HDDS-16363. Fix split-schema MPU size tracking in Recon event handlers - #11181

Open
priyeshkaratha wants to merge 1 commit into
apache:masterfrom
priyeshkaratha:HDDS-16363
Open

HDDS-16363. Fix split-schema MPU size tracking in Recon event handlers#11181
priyeshkaratha wants to merge 1 commit into
apache:masterfrom
priyeshkaratha:HDDS-16363

Conversation

@priyeshkaratha

@priyeshkaratha priyeshkaratha commented Sep 1, 2026

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

Problem:
The Recon API endpoint /api/v1/keys/open/mpu/summary was returning zero sizes for split-schema multipart uploads (MPUs) because event handlers were not tracking part sizes from the multipartPartsTable. Only legacy-schema MPU sizes
(embedded in multipartInfoTable values) were tracked by events. Split-schema MPU sizes were only calculated during periodic reprocess, causing newly created split-schema MPUs to show zero sizes until the next reprocess run.

Root Cause:
When split-schema MPU support was added (HDDS-14666), the MultipartInfoInsightHandler event methods were updated to use forEachLegacyPart(), which returned early for split-schema MPUs without processing any sizes. Event handlers had no mechanism to access multipartPartsTable to fetch split-schema part sizes incrementally.

Solution:

  1. Extended OmTableHandler interface to pass OMMetadataManager to event handlers, enabling access to multipartPartsTable during event processing.

  2. Added new applySplitSchemaPartSizes() method to MultipartInfoInsightHandler that:

    • Queries multipartPartsTable for all parts of a split-schema MPU
    • Calculates unreplicated and replicated sizes for each part
    • Updates size maps on PUT/DELETE/UPDATE events immediately
  3. Integrated split-schema size tracking into PUT, DELETE, and UPDATE event handlers.

  4. Updated DeletedKeysInsightHandler and OpenKeysInsightHandler to accept the new OMMetadataManager parameter (no-op for these handlers).

What is the link to the Apache JIRA

HDDS-16363

How was this patch tested?

  • Added new test testProcessForSplitSchemaMPU() to verify split-schema MPU sizes are calculated immediately on PUT/DELETE events without waiting for reprocess.
  • Test creates split-schema MPU with 3 parts of 100 bytes each, verifies:
    • PUT event results in correct sizes: 300 bytes unreplicated, 900 bytes replicated
    • DELETE event resets sizes to 0
  • All 14 existing tests continue to pass.

Tested manually
image

@priyeshkaratha
priyeshkaratha force-pushed the HDDS-16363 branch 2 times, most recently from 6553694 to ddc342f Compare September 1, 2026 08:43
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.

1 participant