Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Oracle: first use of a new graph from two pools at once can fail with ORA-00054

未关闭
#187 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
56/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
python, sql
领域
backend, databases

调研方向

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,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

liberation-data/drivine-python 的其他 Issue

查看 liberation-data/drivine-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。