hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prakash Khemani (JIRA)" <j...@apache.org>
Subject [jira] Created: (HBASE-3398) increment(Increment, Integer, boolean) might fail
Date Tue, 28 Dec 2010 19:28:45 GMT
increment(Increment, Integer, boolean) might fail

                 Key: HBASE-3398
                 URL: https://issues.apache.org/jira/browse/HBASE-3398
             Project: HBase
          Issue Type: Bug
    Affects Versions: 0.90.0
            Reporter: Prakash Khemani
            Assignee: Jonathan Gray

In org.apache.hadoop.hbase.regionserver.HRegion.increment(Increment, Integer, boolean) the
following loop assumes that the result from geLastIncrement() has a single entry for a given
<family, qualifier>. But that is not necessarily true. getLastIncrement() does a union
of all entries found in each of the store files ... and multiple versions of the same key
are quite possible.

          List<KeyValue> results = getLastIncrement(get);

          // Iterate the input columns and update existing values if they were
          // found, otherwise add new column initialized to the increment amount
          int idx = 0;
          for (Map.Entry<byte [], Long> column : family.getValue().entrySet()) {
            long amount = column.getValue();
            if (idx < results.size() &&
                results.get(idx).matchingQualifier(column.getKey())) {
              amount += Bytes.toLong(results.get(idx).getValue());

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

View raw message