github-advanced-security[bot] commented on code in PR #16214:
URL: https://github.com/apache/lucene/pull/16214#discussion_r3371224412


##########
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:
   ## CodeQL / Time-of-check time-of-use race condition
   
   This uses the state of [rld](1) which [is checked at a previous call](2). 
But these are not jointly synchronized.
   
   [Show more 
details](https://github.com/apache/lucene/security/code-scanning/262)



##########
lucene/core/src/java/org/apache/lucene/index/ReaderPool.java:
##########
@@ -378,7 +399,7 @@
   synchronized boolean anyDocValuesChanges() {
     for (ReadersAndUpdates rld : readerMap.values()) {
       // NOTE: we don't check for pending deletes because deletes carry over 
in RAM to NRT readers
-      if (rld.getNumDVUpdates() != 0) {
+      if (rld.getNumDVUpdates() != 0 || rld.getNumVectorUpdates() != 0) {

Review Comment:
   ## CodeQL / Time-of-check time-of-use race condition
   
   This uses the state of [rld](1) which [is checked at a previous call](2). 
But these are not jointly synchronized.
   
   [Show more 
details](https://github.com/apache/lucene/security/code-scanning/263)



-- 
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