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

IncrementalBlockReportManager#getPerStorageIBR may throw NPE when remove volumes

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsAdd voteVotersStop watchingWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.4.0
    • None
    • datanode

    Description

      When we remove volumes, it may cause IncrementalBlockReportManager#getPerStorageIBR throws NPE.

      Consider below situation:

      1、we have down createRbw、finalizeBlock.  But have not done datanode.closeBlock in method `BlockReceiver.PacketResponder#finalizeBlock`.

      2、we remove volume which replica was written to and it executes such code: `storageMap.remove(storageUuid);`

      3、 we begin to execute datanode.closeBlock which try to send IBR to NameNode. but when getting DatanodeStorage from storageMap using 

      storageUuid, we will get null because we have remove this storageUuid key from storageMap.

      4、Throw NPE in getPerStorageIBR method, because ConcurrentHashMap don't allow null key.

       

       

       

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            zhanghaobo farmmamba Assign to me
            zhanghaobo farmmamba

            Dates

              Created:
              Updated:

              Slack

                Issue deployment