Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-21047

Object creation of StoreFileScanner thru constructor and close may leave refCount to -1

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

Details

    • Reviewed

    Description

      During object creation  "StoreFileScanner", it does not increase the refCount whereas while close it decrements the reader refCount. This will cause refCount to -1 and isReadReference method was returning true (refCount.get() != 0 This is causing store file not to be deleted. This may also cause issue in situation when some thread is holding a scanner but it may actually be closed due to above bug. Impact of this would be really high. Attatching patch for the fix which makes sure if reference is held either thru getScanner method or constructor, ref is always updated. Patch also contains a test which validates the issue. 

      Attachments

        Issue Links

        Activity

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

          People

            vishk Vishal Khandelwal Assign to me
            vishk Vishal Khandelwal
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment