LantaoJin commented on code in PR #16214:
URL: https://github.com/apache/lucene/pull/16214#discussion_r3371340104
##########
lucene/core/src/java/org/apache/lucene/index/ReaderPool.java:
##########
@@ -210,11 +215,15 @@
~ // did was move the state to disk:
changed = true;
}
if (rld.writeFieldUpdates(
- directory, fieldNumbers, completedDelGenSupplier.getAsLong(),
infoStream)) {
+ directory,
+ fieldNumbers,
+ completedDelGenSupplier.getAsLong(),
+ infoStream,
+ deferVectorGraphRebuild)) {
changed = true;
}
- if (rld.getNumDVUpdates() == 0) {
+ if (rld.getNumDVUpdates() == 0 && rld.getNumVectorUpdates() == 0) {
Review Comment:
Both CodeQL TOCTOU findings are within `synchronized` methods (`release`,
`anyDocValuesChanges`) holding the `ReaderPool` monitor, and
`getNumVectorUpdates()` is itself synchronized on the RLD. This mirrors the
long-standing `getNumDVUpdates()` pattern in the same methods -- the new
`getNumVectorUpdates()` checks add no new race. Proposing to dismiss these as
by-design.
--
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]