mirror of https://github.com/apache/lucene.git
LUCENE-2858: fix remaining nocommits
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene2858@1238050 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
13a061943c
commit
57e33cf135
|
@ -160,7 +160,7 @@ public final class SlowCompositeReaderWrapper extends AtomicReader {
|
|||
|
||||
@Override
|
||||
protected void doClose() throws IOException {
|
||||
// nocommit: as this is a wrapper, should we really close the delegate?
|
||||
// TODO: as this is a wrapper, should we really close the delegate?
|
||||
in.close();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,7 +109,6 @@ public class SearcherLifetimeManager implements Closeable {
|
|||
|
||||
public SearcherTracker(IndexSearcher searcher) {
|
||||
this.searcher = searcher;
|
||||
// nocommit: what happens if this is no DirectoryReader?
|
||||
version = ((DirectoryReader) searcher.getIndexReader()).getVersion();
|
||||
searcher.getIndexReader().incRef();
|
||||
// Use nanoTime not currentTimeMillis since it [in
|
||||
|
@ -169,7 +168,6 @@ public class SearcherLifetimeManager implements Closeable {
|
|||
// TODO: we don't have to use IR.getVersion to track;
|
||||
// could be risky (if it's buggy); we could get better
|
||||
// bug isolation if we assign our own private ID:
|
||||
// nocommit: fix getVersion() usage for atomic readers
|
||||
final long version = ((DirectoryReader) searcher.getIndexReader()).getVersion();
|
||||
SearcherTracker tracker = searchers.get(version);
|
||||
if (tracker == null) {
|
||||
|
|
|
@ -116,8 +116,7 @@ public class CheckHits {
|
|||
Assert.assertEquals("Wrap Reader " + i + ": " +
|
||||
query.toString(defaultFieldName),
|
||||
correct, actual);
|
||||
// nocommit: I removed that as we can never get insanity by composite readers anymore... Is this ok?
|
||||
//FieldCache.DEFAULT.purge(s.getIndexReader()); // our wrapping can create insanity otherwise
|
||||
// TODO: FieldCache.DEFAULT.purge(s.getIndexReader()); // our wrapping can create insanity otherwise
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -116,13 +116,13 @@ public class QueryUtils {
|
|||
if (wrap) {
|
||||
IndexSearcher wrapped;
|
||||
check(random, q1, wrapped = wrapUnderlyingReader(random, s, -1), false);
|
||||
// nocommit: I removed that as we can never get insanity by composite readers anymore... Is this ok?
|
||||
// TODO: I removed that as we can never get insanity by composite readers anymore... Is this ok?
|
||||
//FieldCache.DEFAULT.purge(wrapped.getIndexReader()); // our wrapping can create insanity otherwise
|
||||
check(random, q1, wrapped = wrapUnderlyingReader(random, s, 0), false);
|
||||
// nocommit: I removed that as we can never get insanity by composite readers anymore... Is this ok?
|
||||
// TODO: I removed that as we can never get insanity by composite readers anymore... Is this ok?
|
||||
//FieldCache.DEFAULT.purge(wrapped.getIndexReader()); // our wrapping can create insanity otherwise
|
||||
check(random, q1, wrapped = wrapUnderlyingReader(random, s, +1), false);
|
||||
// nocommit: I removed that as we can never get insanity by composite readers anymore... Is this ok?
|
||||
// TODO: I removed that as we can never get insanity by composite readers anymore... Is this ok?
|
||||
//FieldCache.DEFAULT.purge(wrapped.getIndexReader()); // our wrapping can create insanity otherwise
|
||||
}
|
||||
checkExplanations(q1,s);
|
||||
|
|
|
@ -86,7 +86,7 @@ public class TestDirectoryReader extends LuceneTestCase {
|
|||
assertTrue(DocHelper.numFields(newDoc2) == DocHelper.numFields(doc2) - DocHelper.unstored.size());
|
||||
Terms vector = reader.getTermVectors(0).terms(DocHelper.TEXT_FIELD_2_KEY);
|
||||
assertNotNull(vector);
|
||||
// nocommit: pretty sure this check makes zero sense TestSegmentReader.checkNorms(reader);
|
||||
// TODO: pretty sure this check makes zero sense TestSegmentReader.checkNorms(reader);
|
||||
reader.close();
|
||||
}
|
||||
|
||||
|
|
|
@ -366,7 +366,7 @@ public class AllGroupHeadsCollectorTest extends LuceneTestCase {
|
|||
}
|
||||
}
|
||||
} finally {
|
||||
// nocommit FieldCache.DEFAULT.purge(r);
|
||||
// TODO: FieldCache.DEFAULT.purge(r);
|
||||
}
|
||||
|
||||
r.close();
|
||||
|
|
|
@ -1140,9 +1140,9 @@ public class TestGrouping extends LuceneTestCase {
|
|||
assertEquals(docIDToIDBlocks, expectedGroups, topGroupsBlockShards, false, false, fillFields, getScores, false);
|
||||
}
|
||||
} finally {
|
||||
// nocommit FieldCache.DEFAULT.purge(r);
|
||||
// TODO: FieldCache.DEFAULT.purge(r);
|
||||
if (rBlocks != null) {
|
||||
// nocommit FieldCache.DEFAULT.purge(rBlocks);
|
||||
// TODO: FieldCache.DEFAULT.purge(rBlocks);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue