runzhiwang commented on a change in pull request #1828:
URL: https://github.com/apache/ozone/pull/1828#discussion_r561619668
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/DeletedBlockLogImpl.java
##########
@@ -270,15 +300,8 @@ private boolean
isTransactionFailed(DeleteBlockTransactionResult result) {
@Override
public void addTransaction(long containerID, List<Long> blocks)
throws IOException {
- lock.lock();
- try {
- Long nextTXID = scmMetadataStore.getNextDeleteBlockTXID();
- DeletedBlocksTransaction tx =
- constructNewTransaction(nextTXID, containerID, blocks);
- scmMetadataStore.getDeletedBlocksTXTable().put(nextTXID, tx);
- } finally {
- lock.unlock();
- }
+ Map<Long, List<Long>> map = Collections.singletonMap(containerID, blocks);
+ addTransactions(map);
Review comment:
@GlenGeng I have done this in my DeleteBlock pr.
----------------------------------------------------------------
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]