Ethan Rose created HDDS-4061:
--------------------------------

             Summary: Pending delete blocks are not always included in 
#BLOCKCOUNT metadata
                 Key: HDDS-4061
                 URL: https://issues.apache.org/jira/browse/HDDS-4061
             Project: Hadoop Distributed Data Store
          Issue Type: Bug
          Components: Ozone Datanode
            Reporter: Ethan Rose
            Assignee: Ethan Rose


Within the code that handles containers, there is currently some disagreement 
as to whether blocks marked for deletion with the #deleting# prefix should be 
included in the #BLOCKCOUNT metadata value. The BlockDeletingService includes 
pending delete blocks in the block count, since after deleting the blocks, 
BlockDeletingService#call calls 
KeyValueContainerData#updateAndCommitDBCounters, where the pending deletion 
blocks (now deleted) are subtracted from the block count metadata. However, 
KeyValueContainerUtil#initializeUsedBytesAndBlockCount filters away all blocks 
that have prefixes when setting the block count. This means pending delete 
blocks with the #deleting# prefix are excluded from the block count.

This fix will alter KeyValueContainerUtil#initializeUsedBytesAndBlockCount to 
include #deleting# blocks when setting the #BLOCKCOUNT and #BYTESUSED metadata 
values. It will also adjust the TestContainerReader unit tests to account for 
this change.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org

Reply via email to