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

ServerName is not fully case insensitive

    XMLWordPrintableJSON

    Details

      Description

      we ended up with two ServerName with different cases, AAA and aaa.
      Trying to create a table, every once in a while, we ended up with the region lost and not assigned.
      BaseLoadBalancer.roundRobinAssignment() goes through each server and create a map with what to assign to them.
      We had to server on the list AAA and aaa which are the same machine, the problem is that the round robin now is assigning an empty list to one of the two. so depending on the order we ended up with a region not assigned.

      ServerName equals() does the case insensitive comparison but the hashCode() is done on a case sensitive server name, so the Map in ServerManager will never hit the item and compare it using equals, so we end up with two entries that are the same server. similar thing for ServerName.isSameHostnameAndPort() where we don't check for cases

        Attachments

        1. HBASE-13995-v0.patch
          2 kB
          Matteo Bertozzi
        2. HBASE-13995-v0.patch
          2 kB
          Matteo Bertozzi

          Activity

            People

            • Assignee:
              mbertozzi Matteo Bertozzi
              Reporter:
              mbertozzi Matteo Bertozzi
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: