apache / apache/lucene

LuceneTestFramework fails to catch temporary FieldCache insanity [LUCENE-4954]

Open
#6,018 2 comments 0 reactions 0 assignees View on GitHub
legacy-jira-fix-version:4.9 legacy-jira-fix-version:6.0 legacy-jira-priority:Major type:bug
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

Ever since we added readerClosedListeners to evict FieldCache entries, LTC will no longer detect insanity as long as the test closes all readers leading to insanity ...

So this has weakened our testing of catching accidental insanity producing code.

To fix this I think we could tap into FieldCacheImpl.setInfoStream ... and ensure the test didn't print anything to it.

This was a spinoff from #6017, where that test (AllGroupHeadsCollectorTest) is always producing insanity, but then because of a bug the FC eviction wasn't working right, and LTC then detected the insanity.

---
Migrated from [LUCENE-4954](https://issues.apache.org/jira/browse/LUCENE-4954) by Michael McCandless (@mikemccand), updated May 09 2016

Contributor guide

Open the contributing guide

Research direction

Start with LuceneTestFramework and FieldCacheImpl.setInfoStream, then review the reader-close and FieldCache eviction behavior described in the issue. Verify that tests which produce FieldCache insanity still expose output through the framework, and use the AllGroupHeadsCollectorTest context from #6017 to confirm the regression is detected.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.