jimczi opened a new pull request, #16989:
URL: https://github.com/apache/lucene/pull/16989

   When a doc-values update field is new to a segment, 
`ReadersAndUpdates.writeFieldUpdates` creates a `FieldInfo` for it before 
checking whether any of its pending updates applies in this generation. 
`handleDVUpdates` writes values only for updates with `delGen <= maxDelGen`, so 
a field whose updates are all newer gets listed in the segment's field infos 
with no doc-values data. A later merge of that segment then reads a null 
doc-values producer for the field and throws a `NullPointerException`, which 
closes the writer. This happens when an update to a field not yet present in a 
segment is still buffered while that segment is merged.
   
   Register the field only when at least one of its pending updates is 
applicable in this generation, matching the filter `handleDVUpdates` already 
applies.
   
   Found via the AI-assisted bug list (apache/lucene#16937), listed there as 
LFV-013.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to