Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.1, 4.0-ALPHA
-
None
-
New
Description
DirectoryReader only takes shared (with IW) SegmentInfos into account in DirectoryReader#isOptimized(). This can return true even if the actual realtime reader sees more than one segments.
public boolean isOptimized() { ensureOpen(); // if segmentsInfos changes in IW this can return false positive return segmentInfos.size() == 1 && !hasDeletions(); }
DirectoryReader should check if this reader has a non-nul segmentInfosStart and use that instead
Attachments
Attachments
Issue Links
- is blocked by
-
LUCENE-2805 SegmentInfos shouldn't blindly increment version on commit
- Closed
- is related to
-
LUCENE-2355 Refactor Directory/Multi/SegmentReader creation/reopening/cloning/closing
- Open