Details
-
Sub-task
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
3.0.0-alpha1
-
None
-
Reviewed
Description
In BlockManager#reportDiffSorted:
} else if (reportedState == ReplicaState.FINALIZED && (storedBlock.findStorageInfo(storageInfo) == -1 || corruptReplicas.isReplicaCorrupt(storedBlock, dn))) { // Add replica if appropriate. If the replica was previously corrupt // but now okay, it might need to be updated. toAdd.add(new BlockInfoToAdd(storedBlock, replica)); }
"new BlockInfoToAdd(storedBlock, replica)" is wrong because "replica" (i.e., the reported block) is a reused object provided by BlockListAsLongs#iterator. Later this object is reused by directly changing its ID/GS. Thus addStoredBlock can get wrong (reportedBlock, stored-BlockInfo) mapping. For EC the reported block is used to calculate the internal block index. Thus the bug can completely corrupt the EC block group internal states.
Attachments
Attachments
Issue Links
- is related to
-
HDFS-10775 Under-Replicated Blocks can not be recovered
- Open
-
HDFS-10815 The state of the EC file is erroneously recognized when you restart the NameNode.
- Open