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

Evgeny Ryabitskiy updated HBASE-1322:
-------------------------------------

    Attachment: HBASE-1322.patch

Problem was in Memcache...
I has ConcurrentSkipListSet inside...
and we are trying Replace KeyValue by another with same Key but incremented 
value it doesn't change anything
(see javadoc for add method in ConcurrentSkipListSet)... so KeyValu not 
replaced be new... and we didn't store our increment... That was a fail

Changed: If Memcache has already KeyValue with same key... remove this key 
value first then add again new one

{code}
  long add(final KeyValue kv) {
    long size = -1;
    this.lock.readLock().lock();
    try {
      boolean notpresent = this.memcache.add(kv);
      // if false then memcache is not changed (look memcache.add(kv) docs)
      // need to remove kv and add again to replace it
      if (!notpresent && this.memcache.remove(kv)) {
        this.memcache.add(kv);
      }
      size = heapSize(kv, notpresent);
    } finally {
      this.lock.readLock().unlock();
    }
    return size;
  }
{code}

> hbase-1234 broke TestAtomicIncrement; fix and reenable
> ------------------------------------------------------
>
>                 Key: HBASE-1322
>                 URL: https://issues.apache.org/jira/browse/HBASE-1322
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: stack
>            Assignee: Evgeny Ryabitskiy
>            Priority: Blocker
>             Fix For: 0.20.0
>
>         Attachments: HBASE-1322.patch, HBASE-1322.patch
>
>


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

Reply via email to