Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-13350

Negative legacy block ID will confuse Erasure Coding to be considered as striped block

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.1
    • Fix Version/s: 3.2.0, 3.1.1, 3.0.3
    • Component/s: erasure-coding
    • Labels:
      None

      Description

      HDFS-4645 has changed HDFS block ID from randomly generated to sequential positive IDs. And later on, HDFS EC was built on the assumption that normal 3x replica block IDs are positive, so EC re-use negative IDs as striped blocks.

      However, there are legacy block IDs can be negative in the system, we should not use hardcode method to check whether a block is stripe or not:

        public static boolean isStripedBlockID(long id) {
          return BlockType.fromBlockId(id) == STRIPED;
        }
      

        Attachments

        1. HDFS-13350.00.patch
          24 kB
          Lei (Eddy) Xu
        2. HDFS-13350.01.patch
          24 kB
          Lei (Eddy) Xu
        3. HDFS-13350.02.patch
          24 kB
          Lei (Eddy) Xu

          Issue Links

            Activity

              People

              • Assignee:
                eddyxu Lei (Eddy) Xu
                Reporter:
                eddyxu Lei (Eddy) Xu
              • Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: