tarantool / tarantool/tarantool-python
`load_schema` race
未关闭
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 108
- 派生
- 51
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 1
描述
These lines result in an index exception, trying to connect to the instance that actively applies DDL due to the race with the tarantool object creation:
As these two fetches are non-transactional, the second one can return an index for space that is not fetched at the first fetch, resulting in:
Traceback (most recent call last):
File "/python/lib/python3.11/site-packages/tarantool/connection.py", line 1097, in connect
self.load_schema()
File "/python/lib/python3.11/site-packages/tarantool/connection.py", line 1316, in load_schema
self.schema.fetch_index_all()
File "/python/lib/python3.11/site-packages/tarantool/schema.py", line 377, in fetch_index_all
SchemaIndex(row, self.schema[row[0]])
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 tarantool/connection.py 中 1409-1410 附近的链接行开始,然后跟踪 load_schema 到 tarantool/schema.py,并在失败的调用处检查 fetch_index_all。复现 Tarantool 对象并发创建的情况,并检查两次非事务 fetch 如何相互作用。当 load_schema 不再引发索引异常并处理一致的 schema 时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- database
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100