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

getAllRegionLocations can cache locations with null hostname

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.5.0, 3.0.0-alpha-4, 2.4.14
    • None
    • None
    • Hide
      getAllRegionLocations will no longer add locations to the MetaCache which have no server name. Region locations without a server name can occur for brief periods during region splits and merges, but the MetaCache relies on every cached location having a server name.
      Show
      getAllRegionLocations will no longer add locations to the MetaCache which have no server name. Region locations without a server name can occur for brief periods during region splits and merges, but the MetaCache relies on every cached location having a server name.

    Description

      RegionLocator methods typically delegate to ConnectionImplementation.locateRegion, which throws a NoServerForRegionException if the located region's serverName is null. RegionLocator.getAllRegionLocations does not go through that path, instead caching all returned region locations without any validation. This can result in a "dirty" meta cache, since clients do not expect to have null serverNames in the meta cache. We should add the same throwing of NoServerForRegionException to this method as used in the others. Or at least we should not cache the result if the serverName is null.

      Attachments

        Activity

          People

            bbeaudreault Bryan Beaudreault
            bbeaudreault Bryan Beaudreault
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: