Watch
0
0
Fork
You've already forked hyperhive
0

hive-agent: run the event store in WAL and give turn-stats writes a busy timeout

This commit is contained in:
damocles 2026-10-18 01:36:41 +02:00
commit 62ab45297c
6 changed files with 110 additions and 0 deletions

View file

@ -162,6 +162,10 @@ impl TurnStats {
}
let conn = Connection::open(path)
.with_context(|| format!("open turn_stats db {}", path.display()))?;
// Not WAL: hive-c0re reads this db read-only as another uid, which
// fails on a WAL database whose sidecars it cannot create.
conn.busy_timeout(crate::sqlite_writer::BUSY_TIMEOUT)
.context("set turn_stats busy_timeout")?;
conn.execute_batch(SCHEMA)
.context("apply turn_stats schema")?;
for stmt in MIGRATIONS {