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

BlockListAsLongs ctors produce corrupt block list

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.23.0, 2.0.0-alpha, 3.0.0-alpha1
    • Fix Version/s: None
    • Component/s: namenode
    • Labels:
      None

      Description

      BlockListAsLongs() and BlockListAsLongs(long[]) produce invalid instances. The former calls the latter with BlockListAsLongs(null), which is internally short-circuited to create an internal blockList array that does not contain the sentinel delimiting block. An assert in getNumberOfBlocks will trip, which also prevents the "empty" block list from being iterated.

      Both ctors are present in the call tree for DN registration and block reports. Either those code paths are never executed, or the exceptions are swallowed and go unnoticed. I found it while writing unit tests.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              daryn Daryn Sharp
            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated: