/** * Commit live docs changes for the segment readers for * the provided infos. * * @throws IOException If there is a low-level I/O error */ synchronized boolean commit(SegmentInfos infos) throws IOException { boolean atLeastOneChange = false; for (SegmentCommitInfo info : infos) { final ReadersAndUpdates rld = readerMap.get(info); if (rld != null) { assert rld.info == info; boolean changed = rld.writeLiveDocs(directory); changed |= rld.writeFieldUpdates(directory, fieldNumbers, completedDelGenSupplier.getAsLong(), infoStream); if (changed) { // Make sure we only write del docs for a live segment: assert assertInfoIsLive(info); // Must checkpoint because we just // created new _X_N.del and field updates files; // don't call IW.checkpoint because that also // increments SIS.version, which we do not want to // do here: it was done previously (after we // invoked BDS.applyDeletes), whereas here all we // did was move the state to disk: atLeastOneChange = true; } } } return atLeastOneChange; }
if (rld.writeLiveDocs(directory)) {
/** * Commit live docs changes for the segment readers for * the provided infos. * * @throws IOException If there is a low-level I/O error */ public synchronized void commit(SegmentInfos infos) throws IOException { for (SegmentCommitInfo info : infos) { final ReadersAndUpdates rld = readerMap.get(info); if (rld != null) { assert rld.info == info; if (rld.writeLiveDocs(directory)) { // Make sure we only write del docs for a live segment: assert infoIsLive(info); // Must checkpoint because we just // created new _X_N.del and field updates files; // don't call IW.checkpoint because that also // increments SIS.version, which we do not want to // do here: it was done previously (after we // invoked BDS.applyDeletes), whereas here all we // did was move the state to disk: checkpointNoSIS(); } } } }
/** * Commit live docs changes for the segment readers for * the provided infos. * * @throws IOException If there is a low-level I/O error */ public synchronized void commit(SegmentInfos infos) throws IOException { for (SegmentCommitInfo info : infos) { final ReadersAndUpdates rld = readerMap.get(info); if (rld != null) { assert rld.info == info; if (rld.writeLiveDocs(directory)) { // Make sure we only write del docs for a live segment: assert infoIsLive(info); // Must checkpoint because we just // created new _X_N.del and field updates files; // don't call IW.checkpoint because that also // increments SIS.version, which we do not want to // do here: it was done previously (after we // invoked BDS.applyDeletes), whereas here all we // did was move the state to disk: checkpointNoSIS(); } } } }
/** * Commit live docs changes for the segment readers for * the provided infos. * * @throws IOException If there is a low-level I/O error */ synchronized boolean commit(SegmentInfos infos) throws IOException { boolean atLeastOneChange = false; for (SegmentCommitInfo info : infos) { final ReadersAndUpdates rld = readerMap.get(info); if (rld != null) { assert rld.info == info; boolean changed = rld.writeLiveDocs(directory); changed |= rld.writeFieldUpdates(directory, fieldNumbers, completedDelGenSupplier.getAsLong(), infoStream); if (changed) { // Make sure we only write del docs for a live segment: assert assertInfoIsLive(info); // Must checkpoint because we just // created new _X_N.del and field updates files; // don't call IW.checkpoint because that also // increments SIS.version, which we do not want to // do here: it was done previously (after we // invoked BDS.applyDeletes), whereas here all we // did was move the state to disk: atLeastOneChange = true; } } } return atLeastOneChange; }
if (doSave && rld.writeLiveDocs(directory)) {
if (doSave && rld.writeLiveDocs(directory)) {
if (rld.writeLiveDocs(directory)) {
if (rld.writeLiveDocs(directory)) {
if (rld.writeLiveDocs(directory)) {