ChenSammi commented on code in PR #8827:
URL: https://github.com/apache/ozone/pull/8827#discussion_r2259619796


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/ContainerData.java:
##########
@@ -653,12 +658,12 @@ public synchronized void updateDeletion(long 
deletedBytes, long deletedBlockCoun
       blockBytes -= deletedBytes;
       blockCount -= deletedBlockCount;
       blockPendingDeletion -= processedBlockCount;
+      blockPendingDeletionBytes -= deletedBytes;

Review Comment:
   This is incorrect.  deletedBytes is actual bytes released on disk,  while 
blockPendingDeletionBytes is the expected size to delete.  
   
   Here is an example, 
   t1:  a tx comes, blockPendingDeletionBytes is increased with tx block size
   t2: tx is executed and deleted, blockPendingDeletionBytes is decreased with 
tx block size
   t3,  tx deletion ack is sent out by DN
   t4:  tx comes again, blockPendingDeletionBytes is increased with tx block 
size
   t5,  tx deletion ack is handled by SCM
   t6,  tx is executed again, this time, no block deletion, so deletedBytes 
will 0, then blockPendingDeletionBytes is not decreased by tx block size. 
   



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