mirror of https://github.com/apache/lucene.git
add comments to clarify code
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1602140 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
51412938e5
commit
b710568e76
|
@ -185,11 +185,13 @@ class ReadersAndUpdates {
|
|||
getReader(context).decRef();
|
||||
assert reader != null;
|
||||
}
|
||||
// force new liveDocs in initWritableLiveDocs even if it's null
|
||||
liveDocsShared = true;
|
||||
if (liveDocs != null) {
|
||||
return new SegmentReader(reader.getSegmentInfo(), reader, liveDocs, info.info.getDocCount() - info.getDelCount() - pendingDeleteCount);
|
||||
} else {
|
||||
assert reader.getLiveDocs() == liveDocs;
|
||||
// liveDocs == null and reader != null. That can only be if there are no deletes
|
||||
assert reader.getLiveDocs() == null;
|
||||
reader.incRef();
|
||||
return reader;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue