You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "Bill Havanki (JIRA)" <ji...@apache.org> on 2014/02/26 16:21:20 UTC

[jira] [Created] (ACCUMULO-2409) InMemoryMap.compactionIterator() not safe against calls during mutation processing

Bill Havanki created ACCUMULO-2409:
--------------------------------------

             Summary: InMemoryMap.compactionIterator() not safe against calls during mutation processing
                 Key: ACCUMULO-2409
                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2409
             Project: Accumulo
          Issue Type: Bug
          Components: tserver
    Affects Versions: 1.5.0, 1.4.4
            Reporter: Bill Havanki
            Priority: Minor


A sanity check in {{InMemoryMap.compactionIterator()}} ensures that the key/value counts (mutation counts) tracked by the map are consistent, i.e., that the "next" count is one more than the current count. If they are not consistent, an {{IllegalStateException}} is thrown.

A synchronization object is used to serialize the processing of lists of mutations, and while a thread has that object locked, it adjusts the counts. However, the {{compactionIterator()}} method does not use that synchronization and so it can see the counts in an inconsistent state.

It is possible that in practice there is no case where {{compactionIterator()}} is called while mutations are being processed. However, the sanity check could be performed while locking the sync object, making the call safer. Probably even better would be to also get the iterator during that time, when it's guaranteed no mutations are in flight. That may be the point of the check.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)