Stop a SQLite commit that waits for a lock once its transaction's context ends
メンテナーはふだん 1 日以内に返信
@SirLouen がすでに取り組んでいます。
2026年10月22日 から。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
調査の方向性
Start with busyConn.BeginTx and dbkit/sqlite/busy_test.go, especially busyAttachHeld. First verify whether the driver rollback after a failed commit can wait for a lock, then write a red test using an attached rollback journal file held by a reader. Done when a commit waiting on that lock stops when the transaction context ends, while rollback remains safe for the connection pool.
索引モデルが issue の本文から書いたものです。
説明
A commit that waits for a lock on SQLite should stop once the context of its transaction ends, as every other call already does.
Current state: from dbkit/sqlite v0.2.0, every call that takes a context hands it to dbkit's busy handler, so its wait for a lock stops once the context ends. Tx.Commit takes no context, and BeginTx returns the driver's transaction as it is, so a commit that waits runs with no context and waits up to BusyTimeout. dbkit's own file never waits at commit, because its write transactions take the write lock at BEGIN IMMEDIATE. A commit waits only when the transaction wrote to an attached rollback journal database while another connection reads it. Measured: the context ended at 100ms and Commit answered 1.46s later, once the reader let go.
Proposal: wrap the driver's transaction in busyConn.BeginTx so that Commit runs under the context BeginTx was given. Leave Rollback unwrapped: database/sql rolls back on an ended context, and a rollback that stopped early would put a connection still inside a transaction back in the pool. Prove first that the rollback the driver runs after a failed commit never waits for a lock. Test it red first with an attached rollback journal file held by a reader, as busyAttachHeld in dbkit/sqlite/busy_test.go does.
Trigger: dbkit/sqlite v0.2.0 is released.
- 主要言語
- Go
- スター
- 69
- フォーク
- 3
- 平均マージ
- 9時間 11分
- マージ済み PR(30日)
- 38
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
gopherium/framework のほかの issue
-
bug help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
enhancement help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
enhancement help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
enhancement help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
enhancement help wanted
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
gopherium/framework の issue をすべて見る
似ている issue
-
consensus feature I2 S4 U2
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
[Bug] [Go] Ack returns nil when the server answers with a non-OK status対応中かも @leizhiyuan が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
apache/rocketmq-clients#1465 ·
メンテナーはふだん 2 日以内に返信
-
Priority/Low Type/Improvement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
OpenNSW/nsw-srilanka#906 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
praetorianer777/Dynamo#57 ·
メンテナーはふだん 1 日以内に返信
-
fix(handlers): explicitly set Content-Type header in static Index handler対応中かも @kage-zero が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信