HDFS-5616: correct bugs in edit log handling