Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
Description
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.
Attachments
Issue Links
- links to