Skip to content

HDDS-17025. Container push with a negative size reserves a negative amount on the receiving volume that is never released - #11565

Open
Gargi-jais11 wants to merge 1 commit into
apache:masterfrom
Gargi-jais11:HDDS-17025
Open

Gargi-jais11 wants to merge 1 commit into
apache:masterfrom
Gargi-jais11:HDDS-17025

Conversation

@Gargi-jais11

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

When a container push includes a negative size (from a source whose bytesUsed counter has drifted), the receiving datanode reserved 2 * size, which is negative. That lowered the volume’s committed bytes and was never released because release only runs when spaceToReserve > 0. SCM and local volume selection would have inflated free space.

Fixed:
ContainerImporter.getSpaceToReserve now treats a negative size, or one where required replication space would overflow, like a missing size and reserves the default replication space (2 * ozone.scm.container.size) instead.

What is the link to the Apache JIRA

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

How was this patch tested?

Confirmed the new test suggested in the jira testInvalidSizeReservesDefaultSpace failed without the fix and after fix it passes.

Generated with Specula (Claude Opus 5.5).

@Gargi-jais11
Gargi-jais11 marked this pull request as ready for review October 16, 2026 08:27
@Gargi-jais11
Gargi-jais11 requested a review from smengcl October 16, 2026 08:27

@smengcl smengcl 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 @Gargi-jais11 . lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants