contrueCT opened a new pull request, #3243:
URL: https://github.com/apache/hugegraph/pull/3243

   ## Purpose of the PR
   
   Refs #3201 (the independent source-query correction; the fallback 
optimization remains open).
   
   On master `2f827d6e`, a property query across two labels can silently omit 
the label without a compatible index. The regression reproduced one returned 
vertex when two matched, without any #2994 code or negative-label predicate.
   
   This PR makes incomplete coverage an explicit `NoIndexException`. Complete 
coverage still returns the indexed result, and entirely unindexed queries 
retain their existing error. It does not introduce an automatic full scan.
   
   ## Main Changes
   
   - Check every candidate schema label with the existing index matcher at 
source-query execution, including parent/sub-edge indexes and predicate 
compatibility. Preserve the separate stale-index cleanup path.
   - Validate all selected indexes and paging support before opening backend 
iterators. Recheck coverage after schema/index changes and on each page 
request; do not cache an optimizer-time promise.
   - Add cross-label regressions for equality, RANGE, SEARCH, composite/joint 
indexes, index lifecycle, traversal context and paging. Qualify older 
label-specific tests explicitly, while retaining unconstrained multi-label and 
empty-index paging fixtures.
   
   **Compatibility:** queries intended for one label should use 
`hasLabel(...)`; genuine cross-label property queries need compatible indexes 
on every candidate label, including empty labels. A downstream hop or filter 
does not narrow the source's candidate set.
   
   [Design diagram, migration examples and validation 
evidence](https://gist.github.com/contrueCT/669821a6ac6fc5a4d3adf6df6f74a342).
   
   This branch starts directly from master and does not depend on #2994. Its 
integration with #2994 is tested separately; selective pushdown inside #2994's 
conservative local-filtering path is not part of this PR.
   
   ## Verifying these changes
   
   - [x] Need tests and can be verified as follows:
     - Java 11: complete RocksDB vertex/edge/coverage classes passed (452 run, 
29 skipped); all 14 HStore coverage cases passed after an external same-JVM 
transport-readiness check.
     - Query/cache unit selection passed 42/42; isolated `TaskCoreTest` passed 
17/17.
     - The full Memory Core suite ran 830 cases with 97 skipped and five 
Task-only failures/errors. Four reproduced on unmodified master; all 17 Task 
cases passed in the isolated patched run. This is **not** a green full-suite 
claim; details and startup-failure records are in the Gist.
     - Formatting and the Java 17 all-module clean compile passed (38 modules).
   
   Concurrent DDL snapshot isolation, multi-store failover and the full 
distributed Gremlin/HTTP matrix are not certified by these checks. No backend 
format, cursor format or query-resource limit is changed.
   
   ## Does this PR potentially affect the following parts?
   
   - [ ] Dependencies
   - [ ] Modify configurations
   - [x] The public API: previously partial source queries now raise an index 
error; method signatures and REST shapes are unchanged.
   - [ ] Other affects
   - [ ] Nope
   
   ## Documentation Status
   
   - [ ] `Doc - TODO`
   - [x] `Doc - Done`: [Gist migration note and 
design](https://gist.github.com/contrueCT/669821a6ac6fc5a4d3adf6df6f74a342).
   - [ ] `Doc - No Need`
   
   Explanatory material is hosted in Gist, not committed into this repository. 
No hugegraph-doc website change is included.
   


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