imbajin commented on code in PR #3122:
URL: https://github.com/apache/hugegraph/pull/3122#discussion_r3658157115


##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/ConditionQuery.java:
##########
@@ -875,11 +877,17 @@ public boolean checkRangeIndex(HugeElement element, 
Condition cond) {
                 return true;
             }
 
+            Map<Id, Boolean> propertyMatches =
+                    this.element2RangeIndexMatches.get(element.id());
+            if (propertyMatches != null && 
propertyMatches.containsKey(propId)) {

Review Comment:
   ‼️ This cache outlives a single `test(element)` pass, while later index 
batches can continue adding values for the same element/property. If a stale 
value is seen first, `false` is cached and a later batch containing the current 
property value still returns that old result; the reverse case also skips 
left-index cleanup. The exact head reproduces this in 
`VertexCoreTest.testRemoveLeftRangeIndex` across memory, RocksDB, HBase, macOS, 
and HStore (expected 10, observed 2 or 6). Please scope deduplication to one 
condition loop rather than the whole query lifetime, so a later batch 
re-evaluates newly recorded index values, and rerun the full core backend 
matrix.



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