You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2019/03/12 09:31:45 UTC

[GitHub] [hadoop] hunshenshi opened a new pull request #592: HDFS-14361:SNN will always upload fsimage

hunshenshi opened a new pull request #592: HDFS-14361:SNN will always upload fsimage
URL: https://github.com/apache/hadoop/pull/592
 
 
   Related to HDFS-12248.
   
   ``` java
   boolean sendRequest = isPrimaryCheckPointer
       || secsSinceLastUpload >= checkpointConf.getQuietPeriod();
   doCheckpoint(sendRequest);
   ```
   If sendRequest is true, SNN will upload fsimage. But isPrimaryCheckPointer always is true,
   
   ``` java
   if (ie == null && ioe == null) {
     //Update only when response from remote about success or
     lastUploadTime = monotonicNow();
     // we are primary if we successfully updated the ANN
     this.isPrimaryCheckPointer = success;
   }
   ```
   isPrimaryCheckPointer should be outside the if condition.
   
   If the ANN update was not successful, then isPrimaryCheckPointer should be set to false.
   
   

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


With regards,
Apache Git Services

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