Skip to content

HDDS-13664. Persist pendingDeleteBytes only when feature is finalized.#9330

Merged
ChenSammi merged 1 commit intoapache:masterfrom
priyeshkaratha:HDDS-13467_SaveOnFeatureFinalize
Nov 20, 2025
Merged

HDDS-13664. Persist pendingDeleteBytes only when feature is finalized.#9330
ChenSammi merged 1 commit intoapache:masterfrom
priyeshkaratha:HDDS-13467_SaveOnFeatureFinalize

Conversation

@priyeshkaratha
Copy link
Contributor

What changes were proposed in this pull request?

This PR introduces refactors the pending deletion metadata handling logic and comprehensive integration testing for the DataNode data distribution feature upgrade scenario.
The changes include:

  1. Code Refactoring: Refactored to improve the pending deletion metadata handling: KeyValueContainerUtil.java
    • Extracted populatePendingDeletionMetadata() method for better separation of concerns
    • Added separate handler methods for different upgrade states
    • Enhanced the conditional logic to properly handle DATA_DISTRIBUTION feature finalization
    • Improved code readability and maintainability
  2. Integration Test Addition: Created with comprehensive test coverage for the DN data distribution upgrade scenario, specifically validating: TestDNDataDistributionFinalization.java
    • Pre-finalization behavior (handlePreDataDistributionFeature path)
    • Post-finalization behavior (handlePostDataDistributionFeature path)
    • Missing metadata recalculation scenario (getAggregatePendingDelete path)

What is the link to the Apache JIRA

HDDS-13664

How was this patch tested?

Tested using integration added integration tests.

@priyeshkaratha priyeshkaratha marked this pull request as ready for review November 20, 2025 05:22
Copy link
Contributor

@ChenSammi ChenSammi left a comment

Choose a reason for hiding this comment

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

Thanks @priyeshkaratha .

@ChenSammi ChenSammi merged commit 9c932b0 into apache:master Nov 20, 2025
66 of 67 checks passed
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.

2 participants