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

Partially initialized SnapshotHFileCleaner leads to NPE during TestHFileArchiving

    XMLWordPrintableJSON

Details

    • Test
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.0.0-alpha-1
    • None
    • Reviewed

    Description

      TestHFileArchiving#testCleaningRace creates HFileCleaner instance within the test.
      When SnapshotHFileCleaner.init() is called, there is no master parameter passed in params.

      When the chore runs the cleaner during the test, NPE comes out of this line in getDeletableFiles():

            return cache.getUnreferencedFiles(files, master.getSnapshotManager());
      

      since master is null.

      We should either check for the null master or, pass master instance properly when constructing the cleaner instance.

      Attachments

        1. HBASE-21175.v07.patch
          9 kB
          Artem Ervits
        2. HBASE-21175.v05.patch
          9 kB
          Artem Ervits
        3. HBASE-21175.v04.patch
          6 kB
          Artem Ervits
        4. HBASE-21175.v01.patch
          4 kB
          Artem Ervits

        Activity

          People

            dbist13 Artem Ervits
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: