Commit 1d984af
#397 — nested self.conn() draws collapsed the server at >= pool-size
concurrency (32 clients / pool 16: 174 req/s, 30s brownouts, failed writes).
apply_recall_side_effects, find_near_duplicate, and store_embedding now have
*_with_conn variants used by every caller that already holds a pooled
connection (fts5_search recall side-effects, remember's dedup scan and
auto-embed store, embed_entity), so each request uses exactly one pooled
connection. Callers with no live connection keep the self-drawing wrappers.
r2d2's connection_timeout is now tunable via MIMIR_POOL_TIMEOUT_MS
(default unchanged, 30s).
#399 — decay_tick rewrote every non-archived row every tick (412MB WAL per
tick on a 45MB DB @100k). The per-row UPDATE is now skipped when the
recomputed score is within DECAY_WRITE_EPSILON (1e-4) of the stored value and
no archive transition applies, and the layer-demotion UPDATE's WHERE mirrors
its CASE so only rows whose layer actually changes are written.
entities_updated now counts rows actually written (entities_checked still
reports rows evaluated); JSON shape unchanged.
#403 — mimir_history now takes optional limit (default 20, newest first,
0-1000) and offset; the response's total reports the FULL trail size (plus
returned/limit/offset) so agents can page a hot key instead of pulling a
10-15MB response into context.
#404 (concurrency-gate half) — new .github/workflows/concurrency-gate.yml:
lean release build, pool_load_test_http_transport pinned at 2x
oversubscription (CLIENTS=32 / POOL=16, 60s wall budget via new
MIMIR_LOADTEST_MAX_WALL_SECS) plus the four named concurrency hammer tests.
The perf-gate half of #404 remains open.
Measured (Windows, lean release, 32 clients / pool 16 / 5600 requests):
before 174 req/s, p99 436ms, max 31.2s, 16 errors, 786/800 writes persisted;
after 4242 req/s, p99 11.5ms, max 1.19s, 0 errors, 800/800 persisted.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent e15e0e5 commit 1d984af
5 files changed
Lines changed: 399 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
0 commit comments