Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-26036

NPE caused by getMTable() in ObjectStore

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      Issue

      Some api in ObjectStore invoke getMTable() but not check that if the returned value is null, which caused the NPE, like addPartitions(), addPartition(), alterPartition() et.

      Reason

      Such api described above will check that whether the table exists in HMSHandler (first check), but if the table is dropped by other threads after the first check, the NPE will happen.

      The simple idea is that we can check the table each time we get from getMTable().

      Stack example

      Attachments

        1. NPE_From_getMTable.png
          540 kB
          Wechar

        Activity

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

          People

            wechar Wechar Assign to me
            wechar Wechar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 1h
              1h

              Slack

                Issue deployment