GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — Cypher vertex/edge type-kind mismatches leak internal `ClassCastException` · Issue #5194 · ArcadeData/arcadedb Closed Milestone DescriptionArcadeDB versionObserved on the latest Docker image: The behavior was also reproduced in a fresh isolated Docker container, 3 out of 3 runs. Environment
DescriptionArcadeDB leaks internal Java The issue occurs in both directions:
The first case exposes: The reverse case exposes: ArcadeDB may intentionally use a shared namespace for vertex and edge type names. This report does not require creating a vertex type and edge type with the same name to succeed. The issue is that these queries reach internal Java casts instead of being rejected through user-facing schema-kind validation. Reproduction 1: vertex type used as relationship typeRun each statement separately in the same clean database. SetupMATCH (n) DETACH DELETE n; CREATE (:SharedCollision {v:1}); This creates Failing queryMATCH (a:SharedCollision) CREATE (a)-[:SharedCollision]->(:TargetCollision {v:2}) RETURN 1 AS ok; Expected behaviorIf vertex and edge types share one schema namespace, ArcadeDB should reject the query with a clean validation error such as: At minimum, no internal Java class-cast details should be exposed. Actual behaviorThe transaction fails with The error exposes internal implementation classes instead of reporting a schema type-kind conflict. Reproduction 2: edge type used as node labelRun from a clean database. SetupMATCH (n) DETACH DELETE n; CREATE (a:VertexA {v:1}), (b:VertexB {v:2}), (a)-[:EdgeOnlyType {w:1}]->(b); This creates Failing queryMATCH (a:EdgeOnlyType) RETURN count(a) AS cnt; Expected behaviorArcadeDB should either:
It should not attempt to cast matching edges to vertices. Actual behaviorArcadeDB returns an internal Java exception: Control queriesMatching an actual vertex type works correctly: MATCH (a:VertexA) RETURN count(a) AS cnt; Result: Matching a type that does not exist also works without an internal exception: MATCH (a:NoSuchType) RETURN count(a) AS cnt; Result: Using distinct vertex and edge type names works correctly: MATCH (n) DETACH DELETE n; CREATE (a:ControlNode {v:1}), (b:ControlNode {v:2}), (a)-[:ControlEdge]->(b) RETURN 1 AS ok; Result: Behavior summary
ImpactThese errors expose internal Java implementation details and convert a user-facing schema mismatch into an internal execution failure. Applications cannot reliably distinguish a malformed Cypher query or schema conflict from an ArcadeDB engine failure. The exceptions may also cause transactions to fail later in execution or commit rather than being rejected during schema/type validation. Related issuePossibly related to #498, which involved a same-name vertex/edge collision and an internal edge-to-vertex cast failure in the Gremlin traversal path. The current reproductions affect the latest image and exercise separate Cypher paths:
SummaryArcadeDB should validate whether a schema type is a vertex type or edge type before using it in a Cypher node or relationship context. When the type kind is incompatible, the query should return a clean user-facing validation error rather than leaking internal Activity
| ||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |