HDDS-7125. Inaccurate numBlocksDeletion when getTransactions
What changes were proposed in this pull request?
Currently, we find that the deleted block txns in SCM RDB are not updated anymore.
For the unhealthy container(no healthy replica and not enough replicas), SCM will not commit the txn and remove it from RDB until all desired replicas commit it. SCM will add the committed replica to the map dnsWithTransactionCommitted before all replicas commit the txn.
In the process of getTransactions, SCM will read the txn out from RDB and try to add it to the result, but if the txn existed in the dnsWithTransactionCommitted, SCM will ignore it. No matter whether ignoring the txn, the numBlocksDeletion is still counting this, which will lead to nonsense running, and actually returning empty txns when the cluster has a certain amount of unhealthy containers.
- use the real num of blocks as the criterion
- increase the block.deletion.per-interval.max (originally it will be multiplied with the Replication Factor)
- Fix UT and add the scenario of this case.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-7125
How was this patch tested?
UT