[
https://issues.apache.org/jira/browse/HDFS-7611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14286458#comment-14286458
]
Byron Wong commented on HDFS-7611:
----------------------------------
Found it.
The problem occurs in how we do {{FSImage$loadEdits}}.
The gist of it looks like:
{code}
private long loadEdits(...) {
try {
loadEdits();
} finally {
updateCountForQuota();
}
}
{code}
In {{TestFileTruncate$testUpgradeAndRestart()}}, notice that we do:
{code}
saveNamespace();
restart();
deleteSnapshot();
{code}
Since there are no edits to load directly after restart, we immediately call
{{updateCountForQuota()}}, which will set namespace count for the root
directory from 1 to 5. Then deleting the snapshot will decrement the count from
5 to 2.
However, we also do a restart in
{{TestFileTruncate$testTruncateEditLogLoad()}}. In this case, there is an edit
to replay, namely the {{deleteSnapshot()}}. This will decrement the namespace
count from 1 to -1, and afterwards {{updateCountForQuota()}} will set it back
to 2.
> TestFileTruncate.testTruncateEditLogLoad times out waiting for Mini HDFS
> Cluster to start
> -----------------------------------------------------------------------------------------
>
> Key: HDFS-7611
> URL: https://issues.apache.org/jira/browse/HDFS-7611
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 3.0.0
> Reporter: Konstantin Shvachko
> Assignee: Byron Wong
> Attachments: testTruncateEditLogLoad.log
>
>
> I've seen it failing on Jenkins a couple of times. Somehow the cluster is not
> comming ready after NN restart.
> Not sure if it is truncate specific, as I've seen same behaviour with other
> tests that restart the NameNode.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)