lokeshj1703 commented on a change in pull request #2361:
URL: https://github.com/apache/ozone/pull/2361#discussion_r657703424



##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/DeletedBlockLogStateManagerImpl.java
##########
@@ -167,8 +172,13 @@ public void removeFromDB() throws IOException {
   @Override
   public void addTransactionsToDB(ArrayList<DeletedBlocksTransaction> txs)
       throws IOException {
+    Map<ContainerID, Long> containerIdToTxnIdMap = new HashMap<>();
     for (DeletedBlocksTransaction tx : txs) {
+      long tid = tx.getTxID();
+      containerIdToTxnIdMap.compute(ContainerID.valueOf(tx.getContainerID()),
+          (k, v) -> v != null && v > tid ? v : tid);
       transactionBuffer.addToBuffer(deletedTable, tx.getTxID(), tx);

Review comment:
       Fixed in latest commit. containerManager.updateDeleteTransactionId  now 
updates DB via transactionBuffer.




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

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