Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha1
    • Fix Version/s: 3.0.0-alpha2
    • Component/s: erasure-coding
    • Labels:
      None

      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

          Issue Links

            Activity

              People

              • Assignee:
                jingzhao Jing Zhao
                Reporter:
                jingzhao Jing Zhao
              • Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: