Oracle: after the tables grow and shrink, a labelled match with a property and an edge type finds nothing (wrong-results plan?)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by reproducing the issue with the Cypher spec followed by the heavy tests in the same Oracle session, then inspect the generated SQL and compare the executed plan using DISPLAY_CURSOR as a user with V$SESSION access. Try the issue's suggested checks: disable optimizer_adaptive_plans, gather statistics, and drop or rebuild the label index. Done means identifying a reproducible cause and confirming whether the proposed checks resolve the missing match; the issue also suggests checking drivine4j and drivine.
由索引模型根据 Issue 内容生成。
描述
What happens: on Oracle, after a test session has run the Cypher spec (v0.6.1) and then written a hub of 2,500 and 5,000 relationships in the same tables, a labelled match with a property and a typed edge finds nothing, though the data is there:
MATCH (:Person {name: 'Keanu'})-[:KNOWS]->(p) RETURN p.name -- []
When it fails, the store holds 9 nodes and 8 edges, Keanu KNOWS Carrie among them. These still find the row:
MATCH (a:Person)-[:KNOWS]->(p);MATCH (a {name: 'Keanu'})-[:KNOWS]->(p).
(a:Person {name: 'Keanu'})-[r]->(p) finds nothing.
It's on main: main's compiler with the v0.6.1 spec copy and the heavy tests reproduced it in 2 of 2 runs in one session. Without the heavy tests, or without the spec run before them, it passes.
The SQL is plain and identical on main and on the batch-2 branch: drivine_node n1 CROSS JOIN drivine_node n2 CROSS JOIN drivine_edge e3, with n1's label JSON_EXISTS, JSON_QUERY(n1.props, '$.name') = JSON('"Keanu"'), e3.src = n1.nid, e3.dst = n2.nid and e3.type = 'KNOWS'.
EXPLAIN PLAN shows an adaptive plan with dynamic sampling at level 2: nested loops, a full scan of DRIVINE_EDGE filtered on type, DRIVINE_NODE by unique nid for n1 filtered on labels and name, then n2 by nid. Table statistics are NULL. The executed plan may differ; DISPLAY_CURSOR needs V$SESSION, which the test user lacks.
So this looks like an Oracle wrong-results plan, possibly with the multivalue label index or the adaptive plan, once the tables have grown and shrunk without statistics.
Next steps:
- reproduce with
DISPLAY_CURSORas a user that can read V$SESSION; - try
optimizer_adaptive_plans = FALSE, gathering statistics, and dropping or rebuilding the label index; - if it's an Oracle bug, report it with the minimal SQL;
- check drivine4j and drivine (TypeScript) for the same, since they share the layout and the compiled SQL.
Found while porting Cypher batch 2 (drivine4j #206); that port works around it by writing its heavy tests' hub in a graph of its own.
- 主要语言
- Python
- 星标
- 1
- 派生
- 0
- 平均合并
- 1 小时 16 分钟
- 30 天内合并 PR
- 74
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
liberation-data/drivine-python 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
liberation-data/drivine-python#154 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
liberation-data/drivine-python#152 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
liberation-data/drivine-python#150 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
liberation-data/drivine-python#138 ·
维护者通常 1 天内回复
-
Cypher on SQL stores: all(), any(), none() and single() are two-valued where the predicate is null未关闭
难度 4/5 3-5 天 新手友好度 55/100
liberation-data/drivine-python#159 ·
维护者通常 1 天内回复
查看 liberation-data/drivine-python 的全部 Issue
相似的 Issue
-
README.zh-CN/ja/es still hard-code 501 test counts after README.md went count-free可能已有人在做 @Aaqibhafeezkhan 今天认领。 未关闭beginner documentation good first issue
难度 2/5 1-3 小时 新手友好度 75/100
BistaDinesh03/critique#164 · 1 条评论 ·
维护者通常 1 天内回复
-
bug IO
难度 2/5 1-3 小时 新手友好度 65/100
MrNeRF/LichtFeld-Studio#3824 ·
维护者通常 1 天内回复
-
bug confirmed issue
难度 2/5 1-3 小时 新手友好度 72/100
open-webui/open-webui#33200 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 72/100
-
The changelog workflow excludes otelbot but not dependabot, so every Dependabot pull request fails the changelog check可能已有人在做 @ocelotl 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 82/100
open-telemetry/opentelemetry-python#5825 ·
维护者通常 2 天内回复