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 15:45:23 UTC

[jira] [Created] (ACCUMULO-2407) InMemoryMap MemoryIterator closure misses dump file readers

Bill Havanki created ACCUMULO-2407:
--------------------------------------

             Summary: InMemoryMap MemoryIterator closure misses dump file readers
                 Key: ACCUMULO-2407
                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2407
             Project: Accumulo
          Issue Type: Bug
          Components: tserver
    Affects Versions: 1.5.0, 1.4.4
            Reporter: Bill Havanki


The {{InMemoryMap}} class uses a {{SourceSwitchingIterator}} to enable switching over from iterating through memory to through a dump file. The switching iterator uses a {{MemoryDataSource}} which maintains a list of the dump file iterators (readers) in use. The {{MemoryIterator}}, when closing, uses this list to close the readers.

However, two different {{MemoryDataSource}} instances are constructed when iteration is established.

{code}
MemoryDataSource mds = new MemoryDataSource();  // MDS #1
SourceSwitchingIterator ssi = new SourceSwitchingIterator(new MemoryDataSource());  // MDS #2
MemoryIterator mi = new MemoryIterator(new PartialMutationSkippingIterator(ssi, mc));
mi.setSSI(ssi);
mi.setMDS(mds);
{code}

MDS #2 is the one that the switching iterator uses and which maintains the reader list. However, MDS #1 is the one that the memory iterator looks at during closing for readers to close, but it is never used. It's highly likely that the same instance should be used for both.



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