priyeshkaratha opened a new pull request, #11181:
URL: https://github.com/apache/ozone/pull/11181
## 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.
--
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]