Thanks, Nicholas! I'm attaching a new patch to address your feedback. I made the files in this patch match their branch-1 versions more closely. I backported the
HDFS-3540 changes in hdfs-default.xml and DFS_NAMENODE_EDITS_TOLERATION_LENGTH_DEFAULT. Additionally, the latest patch includes a backport of HDFS-3596 to bring FSEditLog.java even closer to the branch-1 code.
I think this makes the code match between the 2 branches as closely as possible without folding in additional features, like recovery mode and concat. We can handle those as separate backports later if needed. For right now, we're most interested in mitigating edit log corruption.
I retested on Mac and Windows.