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:
Uwe Schindler 2012-01-30 22:31:51 +00:00
parent 13a061943c
commit 57e33cf135
7 changed files with 9 additions and 12 deletions

View File

@ -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();
}
}

View File

@ -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) {

View File

@ -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
}
}

View File

@ -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);

View File

@ -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();
}

View File

@ -366,7 +366,7 @@ public class AllGroupHeadsCollectorTest extends LuceneTestCase {
}
}
} finally {
// nocommit FieldCache.DEFAULT.purge(r);
// TODO: FieldCache.DEFAULT.purge(r);
}
r.close();

View File

@ -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);
}
}