Skip to content

Conversation

@priyeshkaratha
Copy link
Contributor

@priyeshkaratha priyeshkaratha commented Jan 19, 2026

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.

@priyeshkaratha priyeshkaratha marked this pull request as ready for review January 20, 2026 03:24
Copy link
Contributor

@ashishkumar50 ashishkumar50 left a comment

Choose a reason for hiding this comment

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

@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.

@priyeshkaratha
Copy link
Contributor Author

Thanks @ashishkumar50 for the review. Updated the description.

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