Repository navigation
Avoid flushing pending DocValues updates to disk for merging segments - #17053
Merged
Merged
Conversation
shbhar
added a commit
to shbhar/lucene-ai-bug-hunt
that referenced
this pull request
Nov 21, 2026
…ngs (LFV-1569 to LFV-1574), all Low, each with a repro: three on the Albanian analysis package that was added to Lucene main and to branch_11x, the 11.0 release branch, on 2026-11-20 (apache/lucene#16957), marked new in 11.0 (LFV-1572: lucene-analysis-common exports the package org.apache.lucene.analysis.sq and does not open it to org.apache.lucene.core, so with Lucene on the module path a resource loader cannot open its word lists; LFV-1574: the normalizer folds the decomposed spelling of a listed word differently from the precomposed one; LFV-1573: two class javadocs name the wrong letter); LFV-1570 (a merge that starts from an existing HNSW graph can leave live documents out of reach of graph search); and two findings on released lines only, shown as fixed before they were listed (LFV-1569, known upstream as apache/lucene#16887 and fixed by #16947; LFV-1571, where main and branch_11x no longer have the code since #16834); five of the six are new and one was already known upstream; LFV-1563 and LFV-1055 show "Fix in progress upstream" with apache/lucene#17053 and #17054; the sentences about #17018 (merged on 2026-11-20) and #16306 brought to the state of that day; LFV-110: two sentences now carry the condition under which a forced merge commits the old value; on findings whose text changed, sentences about what open pull requests of other people do not change were cut; the published repros re-run on Lucene main 7b8418faa2ff (no outcome changed); the list has 1,474 findings, 1,168 new and 306 already known (217 upstream, 89 outside Lucene), 62 of them marked new in 11.0.
jainankitk
reviewed
Nov 24, 2026
jainankitk
left a comment
Contributor
There was a problem hiding this comment.
Thanks @kkewwei, nice find! The fix looks right to me. A few small things inline, mainly the CHANGES entry.
Contributor
Author
|
@jainankitk Very thank you for the review, please have another look in your spare time. |
jainankitk
approved these changes
Nov 25, 2026
jainankitk
pushed a commit
that referenced
this pull request
Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
For example, segments
aandbare merged intoc.https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java#L5484
When reader pooling is disabled, releasing
aduring merge cleanup can flush its pending DocValues updates to disk. This write is unnecessary becauseahas already been merged away.The write triggers
checkpointNoSIS(). Since bothaandbhave already been removed fromsegmentInfos, the checkpoint decrements the references tob’s existing DV update files and may delete them prematurely.https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java#L6882
When
bis subsequently released, flushing its pending DV updates needs to read those deleted files to fold the existing deltas, causingFileNotFoundException.Resolved #17048.