You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/12/11 14:57:21 UTC

[GitHub] [ozone] lokeshj1703 opened a new pull request #1690: HDDS-4580. Datanode can be stuck in leader not ready state after restart

lokeshj1703 opened a new pull request #1690:
URL: https://github.com/apache/ozone/pull/1690


   ## What changes were proposed in this pull request?
   
   On restart the transactions are reapplied for an existing ratis pipeline. ContainerStateMachine#applyTransaction while processing future can throw NullPointerException leading to the future being completed exceptionally.
   ```
         future.thenApply(r -> {
           if (trx.getServerRole() == RaftPeerRole.LEADER) {
             long startTime = (long) trx.getStateMachineContext();
             metrics.incPipelineLatency(cmdType,
                 Time.monotonicNowNanos() - startTime);
           }
   ```
   In the above code snippet trx.getStateMachineContext() will be null during restart and this fails the future itself without updating the applyTransactionCompletionMap. As a result the lastAppliedIndex is not updated for the server and server is stuck in leader not ready state.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-4580
   
   ## How was this patch tested?
   
   Existing UT
   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] xiaoyuyao merged pull request #1690: HDDS-4580. Datanode can be stuck in leader not ready state after restart

Posted by GitBox <gi...@apache.org>.
xiaoyuyao merged pull request #1690:
URL: https://github.com/apache/ozone/pull/1690


   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org