SebastianGruza commented on issue #3090: URL: https://github.com/apache/hugegraph/issues/3090#issuecomment-5694243559
Notes from the #3184 review, recorded here for the proper codec fix. Everything below is outside #3184, which guards only `queryByRange(Session, IdRangeQuery)`. 1. `HstoreTable.queryAll()` pushes `((ConditionQuery) query).bytes()` on both exits with no guard, and the shard overload `queryByRange(Session, Shard, ConditionQuery)` calls `query.bytes()` unconditionally. The guard cannot simply be copied there: on a full scan nothing else enforces the label, since `GraphTransaction.rightResultFromIndexQuery()` returns `true` early for a label-only query (lines 1914-1918). Spotted by @bitflicker64 in https://github.com/apache/hugegraph/pull/3184#discussion_r4023288079. 2. Reachability on hstore: label-only queries never enter `queryAll()`, because `HstoreFeatures.supportsQueryByLabel()` is `false`, so core routes them to the label index (`GraphIndexTransaction.queryByLabel`) or rejects them with `NoIndexException` when the label index is disabled; `g.E()` without `has()` sends a plain `Query` (`HugeGraphStep.makeQuery`), so `queryAll()` pushes `null`. What does reach `queryAll()` with a `ConditionQuery` is the paged full scan (`has('~page', '')`); what reaches the shard overload is REST `/traversers/{vertices,edges}/scan`. 3. Measured on master `36811483`, 5 M edges with 4 sort keys: both paths from point 2 returned rows with properties on the same owner's edges on which the range path fails with `Can't construct Cardinality from code 0`. I did not trace why the node-side decoder is not tripped there (`ScanUtil` wraps every scan method in `FilterIterator.of`), so I treat this as open rather than as "no gap". 4. From the same review: `prepareConditionQueryList()` is guarded by `containsLabelOrUserpropRelation()` while `prepareConditionQuery()` uses `userpropConditions()`, so a label-only query passes the list variant. No live caller today (`HstoreStore.query(List, List)` is never bound, `BackendStore.query(Iterator, Function, HugeGraph)` is marked unused), but worth aligning in the codec fix. -- 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]
