Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
2.9.1, 3.0
-
New
Description
In SegmentTermDocs constructor (from 2.9.1)
46 protected SegmentTermDocs(SegmentReader parent) { 47 this.parent = parent; 48 this.freqStream = (IndexInput) parent.core.freqStream.clone(); 49 synchronized (parent) { 50 this.deletedDocs = parent.deletedDocs; 51 } 52 this.skipInterval = parent.core.getTermsReader().getSkipInterval(); 53 this.maxSkipLevels = parent.core.getTermsReader().getMaxSkipLevels(); 54 }
The synchronization on "parent" for accessing deletedDocs is unnecessary on readonly indexes. If that access was moved into the SegmentReader then it could be protected there by default and overridden in ReadonlySegmentReader.