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


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/helpers/KeyValueContainerUtil.java:
##########
@@ -313,16 +314,32 @@ private static void populateContainerMetadata(
 
     // Set pending deleted block count.
     final long blockPendingDeletion;
+    long blockPendingDeletionBytes = 0L;
+    Long pendingDeletionBlockBytes = metadataTable.get(kvContainerData
+        .getPendingDeleteBlockBytesKey());
     Long pendingDeleteBlockCount =
         metadataTable.get(kvContainerData
             .getPendingDeleteBlockCountKey());
     if (pendingDeleteBlockCount != null) {
       blockPendingDeletion = pendingDeleteBlockCount;
+      if (pendingDeletionBlockBytes != null) {
+        blockPendingDeletionBytes = pendingDeletionBlockBytes;
+      }
     } else {
       // Set pending deleted block count.
       LOG.warn("Missing pendingDeleteBlockCount from {}: recalculate them from 
block table", metadataTable.getName());
       MetadataKeyFilters.KeyPrefixFilter filter =
           kvContainerData.getDeletingBlockKeyFilter();
+
+      List<? extends Table.KeyValue<String, BlockData>> data = 
store.getBlockDataTable()

Review Comment:
   This is incorrect.  BlockDataTable is the table to hold all blocks of one 
container. 
   
   There are three DB schemas, 
   
   DatanodeStoreSchemaOneImpl
   DatanodeStoreSchemaTwoImpl
   DatanodeStoreSchemaThreeImpl
   



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