[ https://issues.apache.org/jira/browse/HADOOP-5314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jakob Homan updated HADOOP-5314: -------------------------------- Attachment: HADOOP-5314.patch I'm afraid that didn't work - at the point loadfsimage is called, the files already exist. I replaced the overly complicated statement that was trying to determine if there were more than one checkpoint times with a set of checkpoint times. It's more elegant - after processing all the storage directories, check the cardinality of the set, if it's greater than one, there were more than one checkpoint times recorded and needToSave should be set to true. Fixing this bug revealed another bug where the editLog was only being opened when the fsimage was being saved. To fix this, I added a call to open the editlog to the end of loadfsimage. Also added some minor readability improvements to the relevant sections of code. Passes all unit tests. {noformat} [exec] -1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] -1 tests included. The patch doesn't appear to include any new or modified tests. [exec] Please justify why no tests are needed for this patch. [exec] [exec] +1 javadoc. The javadoc tool did not generate any warning messages. [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings. [exec] [exec] +1 Eclipse classpath. The patch retains Eclipse classpath integrity. [exec] [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings. {noformat} I can't figure out a reasonable way to unit test these fixes, though I've manually tested them several times. > needToSave incorrectly calculated in loadFSImage() > -------------------------------------------------- > > Key: HADOOP-5314 > URL: https://issues.apache.org/jira/browse/HADOOP-5314 > Project: Hadoop Core > Issue Type: Bug > Components: dfs > Affects Versions: 0.19.0 > Reporter: Konstantin Shvachko > Assignee: Jakob Homan > Fix For: 0.19.2 > > Attachments: HADOOP-5314.patch > > > {{FSImage.loadFSImage()}} incorrectly calculates the value of {{needToSave}}, > which is always true and results in saving image at startup even if that is > not necessary. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.