[ 
https://issues.apache.org/jira/browse/HDFS-7046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14139307#comment-14139307
 ] 

Aaron T. Myers commented on HDFS-7046:
--------------------------------------

I agree with Kihwal and Daryn that the benefit of starting the process of 
leaving safemode while edits are still being processed seems negligible, so 
it's better to be safe here and just wait for the transition to active to 
complete. In a steady state cluster it's very unlikely for the standby to be in 
safemode anyway, since the NN will not enter safemode on its own except 
immediately after startup, and there's little or no reason for the admin to 
ever put the standby in safemode anyway.

+1, the patch makes sense to me. I agree that it would be pretty difficult to 
write a test for this case, and now that the issue is pointed out the fix is 
quite straightforward, so I'm OK committing this without a test.

> HA NN can NPE upon transition to active
> ---------------------------------------
>
>                 Key: HDFS-7046
>                 URL: https://issues.apache.org/jira/browse/HDFS-7046
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 3.0.0, 2.5.0
>            Reporter: Daryn Sharp
>            Assignee: Kihwal Lee
>            Priority: Critical
>         Attachments: HDFS-7046.patch, HDFS-7046_test_reproduce.patch
>
>
> While processing edits, the NN may decide after adjusting block totals to 
> leave safe mode - in the middle of the edit.  Going active starts the secret 
> manager which generates a new secret key, which in turn generates an edit, 
> which NPEs because the edit log is not open.
> # Transitions should _not_ occur in the middle of an edit.
> # The edit log appears to claim it's open for write when the stream isn't 
> even open



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to