You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jonathan Gray (JIRA)" <ji...@apache.org> on 2010/11/17 12:13:14 UTC

[jira] Updated: (HBASE-3243) Disable Table closed region on wrong host

     [ https://issues.apache.org/jira/browse/HBASE-3243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Gray updated HBASE-3243:
---------------------------------

    Attachment: HBASE-3243-v1.patch

Fixes to {{regions}} synchronization including one misuse of {{servers}} modification under it's own lock rather than the {{regions}} lock.

Looking at this more, I'm not sure synchronization is the issue here because TreeMap appears to only be not thread-safe when there are mutations.  The two critical pieces of code where a conflict could happen are where we read the server a region is assigned to, and where we set the server a region is assigned to.

AssignmentManager:525 in {{regionOnline()}}
{noformat}
    synchronized (this.regions) {
      // Add check
      HServerInfo hsi = this.regions.get(regionInfo);
      if (hsi != null) LOG.warn("Overwriting " + regionInfo.getEncodedName() +
        " on " + hsi);
      this.regions.put(regionInfo, serverInfo);
      addToServers(serverInfo, regionInfo);
    }
{noformat}

AssignmentManager:1008 in {{unassign()}}
{noformat}
    synchronized (this.regions) {
      server = regions.get(region);
    }
{noformat}

Seems like this is okay as-is.  We should definitely still apply this patch to fix the synchronization issues but I'm not sure it is the cause.

Digging more.

> Disable Table closed region on wrong host
> -----------------------------------------
>
>                 Key: HBASE-3243
>                 URL: https://issues.apache.org/jira/browse/HBASE-3243
>             Project: HBase
>          Issue Type: Bug
>          Components: master
>    Affects Versions: 0.90.0
>            Reporter: Todd Lipcon
>            Priority: Blocker
>             Fix For: 0.90.0
>
>         Attachments: HBASE-3243-v1.patch
>
>
> I ran some YCSB benchmarks which resulted in about 150 regions worth of data overnight. Then I disabled the table, and the master for some reason closed one region on the wrong server. The server ignored this, but the region remained open on a different server, which later flipped out when it tried to flush due to hlog accumulation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.