[ https://issues.apache.org/jira/browse/HDFS-7886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14353400#comment-14353400 ]
Plamen Jeliazkov commented on HDFS-7886: ---------------------------------------- Hi Yi, I understand the problem a little better now. Removing triggerBlockReports() doesn't fix the tests entirely; it causes the AssertionError to happen less frequently but does not otherwise fix the tests. The problem comes down to this assert error. Prior to truncate, a replica, under normal operations, never changed state from FINALIZED to RUR. I understand that it COULD happen, but as far as test cases go I could not find one that tested such a case nor could I find a specification of such a case in the design doc in HDFS-265, which Konstantin referred me to. What is happening is that in the following code from FsDataSetImpl, the RUR's original replica points to a FINALIZED replica, because it is a truncate recovery operation: {code} case RUR: ReplicaUnderRecovery rur = (ReplicaUnderRecovery)b; uc.get(rur.getVolume().getStorageID()).add(rur.getOriginalReplica()); break; {code} We should open up a new issue to discuss the change, but in short, due to truncate, this assertion is no longer valid because a RUR can now point to a FINALIZED original replica. > TestFileTruncate#testTruncateWithDataNodesRestart runs timeout sometimes > ------------------------------------------------------------------------ > > Key: HDFS-7886 > URL: https://issues.apache.org/jira/browse/HDFS-7886 > Project: Hadoop HDFS > Issue Type: Bug > Components: test > Affects Versions: 2.7.0 > Reporter: Yi Liu > Assignee: Plamen Jeliazkov > Priority: Minor > Attachments: HDFS-7886.patch > > > https://builds.apache.org/job/PreCommit-HDFS-Build/9730//testReport/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)