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

HRegion constructors should not create HLog

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • wal

    Description

      We should get rid of HRegion creating its own HLog. It should ALWAYS get the log from outside.
      I think this was added for unit tests, but we should refrain from such practice in the future (adding UT constructors always leads to weird and critical bugs down the road). See recent: HBASE-11982, HBASE-11654.

      Get rid of weird things like ignoreHLog:

        /**
         * @param ignoreHLog - true to skip generate new hlog if it is null, mostly for createTable
         */
        public static HRegion createHRegion(final HRegionInfo info, final Path rootDir,
                                            final Configuration conf,
                                            final HTableDescriptor hTableDescriptor,
                                            final HLog hlog,
                                            final boolean initialize, final boolean ignoreHLog)
      

      We can unify all the createXX and newXX methods and separate creating a region in the file system vs opening a region.

      Attachments

        1. HBASE-11983.05.patch
          138 kB
          Nick Dimiduk
        2. HBASE-11983.04.patch
          139 kB
          Nick Dimiduk
        3. HBASE-11983.03.patch
          140 kB
          Nick Dimiduk
        4. HBASE-11983.03.patch
          140 kB
          Nick Dimiduk
        5. HBASE-11983.02.patch
          136 kB
          Nick Dimiduk
        6. HBASE-11983.01.patch
          130 kB
          Nick Dimiduk
        7. HBASE-11983.00-branch-1.patch
          143 kB
          Nick Dimiduk
        8. HBASE-11983.00.patch
          125 kB
          Nick Dimiduk

        Issue Links

          Activity

            People

              ndimiduk Nick Dimiduk
              enis Enis Soztutar
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: