priyeshkaratha opened a new pull request, #11629:
URL: https://github.com/apache/ozone/pull/11629

   ## What changes were proposed in this pull request?
   For EC keys, the datanode under-reports pending deletion bytes 
(`TotalPendingBlockBytes` in `BlockDeletingService`). As a result, the DN 
pending deletion value in Recon does not match SCM, and storage distribution 
checks fail some of the time.
   
   HDDS-15076 changed `DeleteBlocksCommandHandler` to add `totalSizePerReplica` 
to a container's pending deletion bytes when a delete transaction is received. 
The release path in `BlockDeletingTask#deleteTransactions` was not updated and 
still subtracts `totalBlockSize` when the transaction is processed. For RATIS 
the two values are equal. For EC, `totalBlockSize` is the logical block size, 
about `data` times the per-replica size, so each processed transaction releases 
far more than it added. The result is clamped at 0.
   
   The error is hidden when all pending transactions of a container are 
processed in the same run. It shows up when a newer transaction is already 
pending in the same container while an older one is processed in a separate run 
(block deletion limit, lock holding time cutoff, or a new transaction arriving 
in between). The extra amount subtracted then removes the newer transaction's 
pending bytes. 
   
   This change releases the same size that was added: `totalSizePerReplica` 
when present, otherwise `totalBlockSize` for transactions stored before 
HDDS-15076.
   ## What is the link to the Apache JIRA
   
   HDDS-17158
   
   ## How was this patch tested?
   
   Tested locally and also added test cases.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to