hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-11249) Missing null check in finally block of HRegion#processRowsWithLocks()
Date Sun, 25 May 2014 14:28:01 GMT

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

Ted Yu updated HBASE-11249:
---------------------------

    Description: 
At line 4883:
{code}
            Store store = getStore(kv);
            if (store == null) {
              checkFamily(CellUtil.cloneFamily(kv));
              // unreachable
            }
{code}
Exception would be thrown from checkFamily() if store is null.
In the finally block:
{code}
      } finally {
        if (!mutations.isEmpty() && !walSyncSuccessful) {
          LOG.warn("Wal sync failed. Roll back " + mutations.size() +
              " memstore keyvalues for row(s):" + StringUtils.byteToHexString(
              processor.getRowsToLock().iterator().next()) + "...");
          for (KeyValue kv : mutations) {
            getStore(kv).rollback(kv);
          }
{code}
There is no corresponding null check for return value of getStore() above, potentially leading
to partially rolled back state in memstore.

  was:
At line 4883:
{code}
            Store store = getStore(kv);
            if (store == null) {
              checkFamily(CellUtil.cloneFamily(kv));
              // unreachable
            }
{code}
Exception would be thrown from checkFamily() if store is null.
In the finally block:
{code}
      } finally {
        if (!mutations.isEmpty() && !walSyncSuccessful) {
          LOG.warn("Wal sync failed. Roll back " + mutations.size() +
              " memstore keyvalues for row(s):" + StringUtils.byteToHexString(
              processor.getRowsToLock().iterator().next()) + "...");
          for (KeyValue kv : mutations) {
            getStore(kv).rollback(kv);
          }
{code}
There is no corresponding null check for store above, potentially leading to partially rolled
back state in memstore.


> Missing null check in finally block of HRegion#processRowsWithLocks()
> ---------------------------------------------------------------------
>
>                 Key: HBASE-11249
>                 URL: https://issues.apache.org/jira/browse/HBASE-11249
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>
> At line 4883:
> {code}
>             Store store = getStore(kv);
>             if (store == null) {
>               checkFamily(CellUtil.cloneFamily(kv));
>               // unreachable
>             }
> {code}
> Exception would be thrown from checkFamily() if store is null.
> In the finally block:
> {code}
>       } finally {
>         if (!mutations.isEmpty() && !walSyncSuccessful) {
>           LOG.warn("Wal sync failed. Roll back " + mutations.size() +
>               " memstore keyvalues for row(s):" + StringUtils.byteToHexString(
>               processor.getRowsToLock().iterator().next()) + "...");
>           for (KeyValue kv : mutations) {
>             getStore(kv).rollback(kv);
>           }
> {code}
> There is no corresponding null check for return value of getStore() above, potentially
leading to partially rolled back state in memstore.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message