linyiqun commented on a change in pull request #1737:
URL: https://github.com/apache/ozone/pull/1737#discussion_r550835514



##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/SCMBlockDeletingService.java
##########
@@ -146,9 +151,10 @@ public EmptyTaskResult call() throws Exception {
               // We should stop caching new commands if num of un-processed
               // command is bigger than a limit, e.g 50. In case datanode goes
               // offline for sometime, the cached commands be flooded.
+              SCMCommand<?> command = new DeleteBlocksCommand(dnTXs);
+              command.setTerm(scmContext.getTerm());

Review comment:
       Could we also catch the NotLeaderException like other places does?  
There are some other places we don't catch this exception that is swallowed by 
IOException.
   ```java
           } catch (NotLeaderException nle) {
   
           }  catch (IOException e) {
             // We may tolerate a number of failures for sometime
             // but if it continues to fail, at some point we need to raise
             // an exception and probably fail the SCM ? At present, it simply
             // continues to retry the scanning.
             LOG.error("Failed to get block deletion transactions from delTX 
log",
                 e);
             return EmptyTaskResult.newResult();
           }
   ```




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