Repository navigation
Replies: 1 comment
|
I found a related performance issue even when reconciliation succeeds and nothing needs updating. With eight attached sessions, searching xyzx took 2,069 ms:
No cold session reads or live index replacements occurred. Unchanged live histories were still cloned, projected, serialized and hashed on every search. I tested reusing the derived observation while the same Session object's append-only seq remains unchanged. In paired tests against copies of the real index, this removed repeated history processing and reduced selective warm API searches from ~1.8 s to ~0.7 s, with identical ordered results. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Symptoms
Two failures in the SQLite session search observation (
SqliteSessionQueryEngine._observeStable), both seen on long-lived instances with many stored sessions:readColdSessionLogthrows for a single session (for example a released-format log with a seq gap), thecatcharound the whole cold-read loop turns it intoSESSION_QUERY_PERSISTENCE_FAILED, and nothing is indexed or searchable for as long as that log exists.samePersistenceSnapshotscompares the revision of every listed session, including live sessions whose logs are appended to while a multi-minute cold read runs. Attempt 1 fails the comparison, attempt 2 re-reads every cold log from scratch and fails the same way (STABLE_OBSERVATION_ATTEMPTS = 2). On a busy instance with about 1,400 stored logs the search gave no answer for minutes and then errored with "did not stabilize after one retry".Proposal
loaded, so it is neither indexed nor does it delete a row the index already holds. Remember the failing id and revision so it is not re-read on every search, warn once, and read it again when its revision changes. Aborts and a moved persistence binding keep their current paths.observeLive, never from its log, so its log churn cannot invalidate the observation.Reference branch (two new specs that fail on master and pass with the change): https://github.com/gkinter/deepseek-harness/tree/fix/session-query-sqlite-observation
vitest run packages/session-query/session-query-sqlite/tests/sqlite.spec.ts: 60 of 62 pass; the other two need the native flock addon, which is not built in my environment, and they fail the same way on master. oxlint clean. A further improvement, not in the branch, is caching cold logs across the two attempts keyed by id and revision. Based on master at 0.2.1-alpha.3.All reactions