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

BlockIdManager.clear doesn't reset the counter for blockGroupIdGenerator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.0.0-alpha1, 3.0.0-beta1
    • 3.0.0-alpha2
    • hdfs
    • Reviewed
    • erasurecode

    Description

      BlockIdManager.clear resets the block id generator for contiguous blocks but not for striped blocks:

        void clear() {
          legacyGenerationStamp.setCurrentValue(GenerationStamp.LAST_RESERVED_STAMP);
          generationStamp.setCurrentValue(GenerationStamp.LAST_RESERVED_STAMP);
          getBlockIdGenerator().setCurrentValue(SequentialBlockIdGenerator
            .LAST_RESERVED_BLOCK_ID);
          legacyGenerationStampLimit = HdfsConstants.GRANDFATHER_GENERATION_STAMP;
        }
      

      This should have:

      getBlockGroupIdGenerator().setCurrentValue(Long.MIN_VALUE);
      

      Attachments

        1. HDFS-10769.001.patch
          0.8 kB
          Yiqun Lin
        2. HDFS-10769-002.patch
          2 kB
          Rakesh Radhakrishnan

        Activity

          People

            linyiqun Yiqun Lin
            ehiggs Ewan Higgs
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: