accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Havanki (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ACCUMULO-2407) InMemoryMap MemoryIterator closure misses dump file readers
Date Wed, 26 Feb 2014 14:45:23 GMT
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)

Mime
View raw message