HDDS-14429. Avoid Duplicate Transaction Deletion and Replica-Level TxnSize Updates#9645
Merged
ashishkumar50 merged 1 commit intoapache:masterfrom Jan 21, 2026
Merged
Conversation
ashishkumar50
approved these changes
Jan 20, 2026
Contributor
ashishkumar50
left a comment
There was a problem hiding this comment.
@priyeshkaratha Thanks for the improvement. LGTM.
Can you please update PR description to specify that this is just for capacity distribution metrics and not related to deletion functionality.
Contributor
Author
|
Thanks @ashishkumar50 for the review. Updated the description. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This PR improves how deleted block transactions are handled in the SCM. It avoids doing the same work multiple times during transaction processing and removal. Transaction size is now updated only once for each successfully processed transaction, and duplicate delete operations are removed. This makes the process more efficient and accurate.
This change is added only to improve the capacity distribution metrics and not related to deletion functionality.
Transaction Size Map Update Logic: The logic for updating the transaction size map (addTxToTxSizeMap) has been refined to ensure it is only invoked for transactions that are successfully added and not for duplicates. This prevents incorrect updates for transactions that are already being processed.
Streamlined Transaction Removal: The process for removing deleted block transactions has been streamlined by consolidating the removal calls and delegating the responsibility to transactionStatusManager. This change eliminates redundant calls to remove transactions from different state managers, ensuring a single, authoritative removal mechanism.
What is the link to the Apache JIRA
HDDS-14429
How was this patch tested?
There is not logic changes, so that it can be validated by existing unit and integration tests.