bshashikant commented on a change in pull request #2361:
URL: https://github.com/apache/ozone/pull/2361#discussion_r657661916
##########
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:
transactionBuffer.addToBuffer will update the DB only when the ratis
snapshot is taken, where as the next call ,
containerManager.updateDeleteTransactionId will update the in-memory state as
well the container db right away. Is this desirable?
--
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]