Repository navigation
Conversation
Two related reliability fixes for the graph-memory:recall context DSH
injects on every prompt assembly:
- src/store/db.ts: configure PRAGMA busy_timeout = 5000 in openDb so a
write that collides with another connection's transaction (e.g. a second
DSH process sharing ~/.dsh/graph-memory/graph-memory.db) waits for the
lock instead of failing instantly with SQLITE_BUSY ("database is locked").
- dsh.ts: evict a recall from recallCache when it fails. Previously the
rejected Promise stayed pinned, so every subsequent system-prompt/assemble
re-awaited it and logged "[graph-memory] DSH recall failed" on each round
until the next agent/inbox/claimed cleared it - a single transient error
became a per-round failure.
Adds regression tests: busy_timeout is configured on every connection plus
a cross-process write-wait test, and the recall cache is evicted on failure
while successful recalls stay cached.
Owner
|
感谢 @Liyuk 提交并持续更新这个修复,也感谢提供独立进程写锁的回归思路。 这个问题已经在 main / v1.6.0-beta.17 覆盖:数据库所有入口共用可配置的 本次审查还直接加载了 PR 提交的 因此按“已由主线覆盖”关闭本 PR,不是将此 PR 标记为已合并。感谢你定位并推动这个可靠性问题!如最新 main 上还有未覆盖的争用场景,欢迎另提最小复现或新 PR。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Configure
PRAGMA busy_timeout = 5000inopenDbso concurrent processes sharing the same SQLite file wait briefly for transient write locks instead of failing immediately withSQLITE_BUSY.The earlier DSH recall-cache portion of this PR is no longer applicable after the upstream recall pipeline was refactored, so this update keeps the database reliability fix and its regression coverage only.
Coverage
The current PR branch is updated against the latest
main. CI should run the regression tests.