Oracle: first use of a new graph from two pools at once can fail with ORA-00054
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with GraphTables and OracleGraph.ensuring, then read tests/integration/sql/test_graph_tables_on_first_use.py and the linked Drivine TypeScript issue #365 for the concurrent initialization design. Reproduce first use with two separate Oracle pools; add coverage showing both callers proceed and the tables are created once. The issue leaves the fix dependent on what #365 settles.
由索引模型根据 Issue 内容生成。
描述
What happens: on Oracle, two pools (or processes) that make a new graph's tables at the same moment can fail with ORA-00054 (a TM lock held by another session), not wait. The first-connection ensure (GraphTables, #184, running OracleGraph.ensuring) tolerates ORA-00955 (the object exists) but not ORA-00054, which a second session's DDL gets while the first holds the table's lock.
Seen in the TypeScript library's CI, whose Oracle block is the same design: liberation-data/drivine#365's test "should make the tables once when connections, pools and an object manager first use them together" failed with ORA-00054 … ORA-06512: at line 32. drivine-python's tests (tests/integration/sql/test_graph_tables_on_first_use.py) run concurrent first use within one pool only, where GraphTables' lock serialises it, so they don't reach this.
Expected: first use from separate pools or processes at once makes the tables once and every caller proceeds, as Postgres does with its advisory lock.
A fix: set DDL_LOCK_TIMEOUT for the block (and reset it), or treat ORA-00054 as another session making the tables and check again. Add a test with two separate pools at once on Oracle. Follow whatever liberation-data/drivine#365 settles on.
- 主要语言
- Python
- 星标
- 1
- 派生
- 0
- 平均合并
- 1 小时 10 分钟
- 30 天内合并 PR
- 88
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
liberation-data/drivine-python 的其他 Issue
-
CI: three Oracle-only tests in test_cypher_compiled.py never run, as -k oracle doesn't select them未关闭
难度 1/5 1 小时以内 新手友好度 88/100
liberation-data/drivine-python#178 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
liberation-data/drivine-python#168 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
liberation-data/drivine-python#138 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
liberation-data/drivine-python#189 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
liberation-data/drivine-python#188 ·
维护者通常 1 天内回复
查看 liberation-data/drivine-python 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
letsencrypt/cp-cps#361 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
-
CI: startup_failure because callers grant fewer permissions than ledger-app-workflows@v1 declares可能已有人在做 @maykonmichel 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
LedgerHQ/app-boilerplate-rust#227 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
linuxmint/mintupdate#1107 ·