Skip to content

HDDS-5800. Bucket usedByte was incorrect when deleting duplicate keys.#2696

Merged
bharatviswa504 merged 1 commit into
apache:masterfrom
captainzmc:fix-quota-1
Sep 30, 2021
Merged

HDDS-5800. Bucket usedByte was incorrect when deleting duplicate keys.#2696
bharatviswa504 merged 1 commit into
apache:masterfrom
captainzmc:fix-quota-1

Conversation

@captainzmc
Copy link
Copy Markdown
Member

@captainzmc captainzmc commented Sep 29, 2021

What changes were proposed in this pull request?

When we repeatedly write a key and then delete the key. We should count all versions of the key and subtract them from bucket usedBytes.

Previously we only subtracted the key size of the last version, which resulted in inaccurate bucket usedBytes.
image

What is the link to the Apache JIRA

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

How was this patch tested?

UT added

Copy link
Copy Markdown
Contributor

@bharatviswa504 bharatviswa504 left a comment

Choose a reason for hiding this comment

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

+1 LGTM.
Good catch.

@bharatviswa504 bharatviswa504 merged commit af7dc7e into apache:master Sep 30, 2021
@bharatviswa504
Copy link
Copy Markdown
Contributor

Thank You @captainzmc for the contribution.

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