Worker plandb calls can fail with SQLITE_BUSY while the run holds its store
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 64/100
Hướng nghiên cứu
Read internal/plandb/persist.go:213 and internal/plandb/store.go:100, then run the deterministic lock-holding reproduction in internal/plandb. Check the open, show, and done paths, including the existing e2e and unit coverage. Done means read-only show works during a held write transaction, writes have bounded retry or explicit retryable behavior, and the manual and invalidates reflect changed wording.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Found on santos/dev2 at 008363c98 (#1410). It reaches dev when #1410 merges.
What happened
On 2026-09-24, 16 worker trajectories in 11 of 34 conversations contained error: database is locked (5) (SQLITE_BUSY) from plandb calls, including plandb done. Read calls were among those affected. The store has a separate deferred read handle, but opening a CLI store also opens and initializes its immediate-lock write handle; a writer holding the file past the five-second busy timeout can make that opening fail.
Replication
Deterministic (no model). In internal/plandb, create a plan with Open, then use a second database/sql connection using the repository's modernc.org/sqlite driver and _txlock=immediate to hold a transaction for longer than five seconds. While held, open the same plan as the worker CLI does and run show or done. Today the open or command can return database is locked (5) (SQLITE_BUSY). Release the transaction and repeat as the control.
Field (real models). Run a multi-part /task on deepseek/deepseek-v4-flash with OPENROUTER_API_KEY; allow several minutes and a few cents. Inspect worker-visible plandb responses. The observed rate above came from one hand run, not a guaranteed reproduction rate.
Where
internal/plandb/persist.go:213, openDatabase, uses _txlock=immediate&_pragma=busy_timeout(5000); internal/plandb/store.go:100, Open, opens that handle before the deferred read handle.
The fix
Let read-only CLI operations open without taking a writer's lock. Serialize or retry writes for a bounded, explicit period and report a recoverable contention state without making a worker infer what happened.
Acceptance
- e2e: a worker
plandb showsucceeds while another handle holds a write transaction;doneeither succeeds after release or returns an explicit retryable result. - Unit: the lock-holding fixture covers open, read and write paths.
- Update the plandb manual and
invalidatesfor any changed retry wording.
- Ngôn ngữ chính
- Go
- Star
- 115
- Fork
- 14
- Merge trung bình
- 9 giờ 38 phút
- Pull request đã merge (30 ngày)
- 749
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Agent-Field/CodeAF
-
area:chat feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Agent-Field/CodeAF#1510 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Agent-Field/CodeAF#1489 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:chat bug good first issue sev:papercut
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Agent-Field/CodeAF#1470 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:chat bug good first issue sev:papercut
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Agent-Field/CodeAF#1469 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:chat bug sev:papercut
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Agent-Field/CodeAF#1468 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Agent-Field/CodeAF
Issue tương tự
-
bug needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug P2 reliability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
afreidah/s3-orchestrator#1564 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
blinklabs-io/gouroboros#2577 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày