szetszwo commented on code in PR #4337:
URL: https://github.com/apache/ozone/pull/4337#discussion_r1135218616


##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/keyvalue/TestKeyValueContainerMetadataInspector.java:
##########
@@ -290,11 +402,53 @@ private void checkJsonErrorsReport(JsonObject jsonReport,
 
   public void setDBBlockAndByteCounts(KeyValueContainerData containerData,
       long blockCount, long byteCount) throws Exception {
+    setDB(containerData, blockCount, byteCount,
+        0, Collections.emptyList());
+  }
+
+  public void setDB(KeyValueContainerData containerData,
+      long blockCount, long byteCount,
+      long dbDeleteCount, List<DeletedBlocksTransaction> deleteTransactions)
+      throws Exception {
     try (DBHandle db = BlockUtils.getDB(containerData, getConf())) {
       Table<String, Long> metadataTable = db.getStore().getMetadataTable();
       // Don't care about in memory state. Just change the DB values.
       metadataTable.put(containerData.getBlockCountKey(), blockCount);
       metadataTable.put(containerData.getBytesUsedKey(), byteCount);
+      metadataTable.put(containerData.getPendingDeleteBlockCountKey(),
+          dbDeleteCount);
+
+      final DatanodeStore store = db.getStore();
+      LOG.info("store {}", store.getClass().getSimpleName());
+      if (store instanceof DatanodeStoreSchemaTwoImpl) {

Review Comment:
   There are `DatanodeStoreSchemaTwoImpl` and `DatanodeStoreSchemaThreeImpl`.  
The key types for `delTxTable` are different  in v2 and v3.



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