Over synchronization for read-only index readers in SegmentTermDocs -------------------------------------------------------------------
Key: LUCENE-2171 URL: https://issues.apache.org/jira/browse/LUCENE-2171 Project: Lucene - Java Issue Type: Improvement Components: Search Affects Versions: 3.0, 2.9.1 Reporter: Jayson Minard Priority: Minor In SegmentTermDocs constructor (from 2.9.1) {code} 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 } {code} 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. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org