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

EC: Fix bug in updateBlockForPipeline after failover

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      In the method `updateBlockForPipeline`, NameNode uses the `BlockUnderConstructionFeature` of a BlockInfo to generate the member `blockIndices` of `LocatedStripedBlock`. 

      And then, NameNode uses `blockIndices` to generate block tokens for client.

      However, if there is a failover, the location info in BlockUnderConstructionFeature may be incomplete, which results in the absence of the corresponding block tokens.

      When the client receives these incomplete block tokens, it will throw a NPE because `updatedBlks[i]` is null.

      NameNode should just return block tokens for all indices to the client. Client can pick whichever it likes to use. 

       

      Attachments

        Issue Links

          Activity

            People

              zhangshuyan Shuyan Zhang
              zhangshuyan Shuyan Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: