mirror of
https://ghproxy.cflmy.top/https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-11-30 00:59:36 +08:00
* feat(session): archive idle SQLite Sessions and add on-demand store compaction * fix(session): preserve derived views on v2-to-v3 upgrade and harden cold restore races * feat(session): default coldAfterDays to 30 and skip set-aside unreadable segments * fix(session): clear cancelled warm entries and recheck cold state under write lease * refactor(session): keep compactStorage internal to dsh-session-persistence-sqlite
8 lines
519 B
SQL
8 lines
519 B
SQL
-- Restore the payload of one indexed event of the cold Segment, matching replace surface_op values regardless of key order.
|
|
UPDATE events SET codec = ?1, data = ?2 WHERE segment_id = ?3 AND seq = ?4 AND codec = 254
|
|
AND type = ?5 AND time = ?6 AND source_seqs IS ?8 AND ignorable IS ?9
|
|
AND (surface_op IS ?7 OR (json_valid(surface_op) AND json_valid(?7)
|
|
AND surface_op ->> '$.op' = ?7 ->> '$.op'
|
|
AND surface_op ->> '$.startSeq' = ?7 ->> '$.startSeq'
|
|
AND surface_op ->> '$.endSeq' = ?7 ->> '$.endSeq'));
|