Commit 7a1ba85
* feat(logs): mirror consolidated + sessions tiers to rustfs (#116)
geo-agent-ops minted the scoped credential pair, but rustfs
logs-open-llm-proxy is empty, so logs-open-llm-proxy-reader can't
answer anything yet. This is the step that fills it.
Both consolidation CronJobs now copy consolidated/** and sessions/**
to rustfs after the tiers are written and verified.
Credentials bind under RUSTFS_* rather than AWS_*, per the collision
called out in #116: the jobs already bind AWS_ACCESS_KEY_ID /
AWS_SECRET_ACCESS_KEY to the `aws` secret for the NRP source, and
reusing those names would overwrite the source credential and break the
job before it mirrored anything. Endpoint and bucket come from the
Secret too, so moving rustfs doesn't mean editing this repo.
All four bindings are optional:true — a cluster without the Secret still
consolidates and prints the mirror as skipped.
Copy-only, never delete: an accidental source deletion must not
propagate. Re-copies when source LastModified or size differs, which is
what catches the reflatten pass rewriting files in place — size alone is
not a witness, since a re-flatten can land on an identical byte count.
Ordered last so a mirror failure cannot cost the consolidation work, but
it does fail the Job: a mirror that quietly stops is a stale mirror
nobody notices, and the reader would keep serving stale answers.
Verified: both manifests parse as YAML and their embedded Python passes
ast.parse (heredoc indentation intact). Mirror logic exercised against
stub clients over six cases — absent credential skips; empty dest
copies; matching mtime+size skips; same-size-newer-mtime re-copies (the
reflatten case); a 403 on HEAD raises instead of being swallowed as
"missing"; and no path deletes at the destination.
Not run against live rustfs — needs the Secret, which exists only
in-cluster. First scheduled run is the real test.
* fix(logs): raise CronJob memory + isolate backfill — daily job OOM-wedged 9 days
Discovered while checking whether the rustfs mirror was live: it can't be,
because the daily job never reaches the mirror step. It has failed every
night since 2026-08-07.
OutOfMemoryException: failed to allocate 256.0 KiB (819.0 MiB/819.1 MiB used)
in build_session_view, backfilling 2026-08-07
Self-perpetuating: the day fails, keeps its slot on the backfill list, and
re-breaks the job the next night. threads=2 and preserve_insertion_order
=false were already set, so the cheap mitigations were spent. New days were
still consolidating (that loop runs first), but session views for
2026-08-07/08/12 are missing and the reflatten pass has not run in 9 days.
These are CronJobs, not persistent pods, so the 2Gi rule for long-lived
workloads doesn't bind. Daily 1Gi -> 4Gi with DuckDB capped at 3GB; monthly
2Gi -> 6Gi capped at 4GB; both get temp_directory plus an ephemeral-storage
request to back the spill.
Headroom is the primary fix and the comment says so. Measured on a
session-view-shaped build (window function + self-join over a wide
payload): spill off failed at 500MB and 1GB, passed at 2GB; spill on
passed at 500MB; at 200MB both failed. DuckDB does not spill every
operator, so temp_directory is a margin, not a cure. An earlier draft of
this change claimed spilling made the failure impossible -- the test above
refuted that and the comment was corrected before commit.
The monthly job is raised although it has not failed: same code over a
whole month is strictly more exposed, and 2026-09-02 rolls up an August
holding the benchmark sweeps.
Backfill now isolates each day. One oversized day is recorded and skipped
so reflatten and the rustfs mirror still run; the job then raises with the
failed-day list, so it stays loud rather than quietly tolerating a gap.
Both manifests parse as YAML and their embedded Python passes ast.parse.
---------
Co-authored-by: Default User <email@example.com>
1 parent 69f8b0d commit 7a1ba85
4 files changed
Lines changed: 257 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
99 | 140 | | |
100 | 141 | | |
101 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
120 | 133 | | |
121 | 134 | | |
122 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
40 | 58 | | |
41 | 59 | | |
42 | 60 | | |
| |||
46 | 64 | | |
47 | 65 | | |
48 | 66 | | |
| 67 | + | |
49 | 68 | | |
50 | 69 | | |
51 | 70 | | |
| |||
103 | 122 | | |
104 | 123 | | |
105 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
106 | 137 | | |
107 | 138 | | |
108 | 139 | | |
| |||
266 | 297 | | |
267 | 298 | | |
268 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
269 | 307 | | |
270 | 308 | | |
271 | | - | |
272 | | - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
273 | 315 | | |
274 | 316 | | |
275 | 317 | | |
| |||
280 | 322 | | |
281 | 323 | | |
282 | 324 | | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
283 | 388 | | |
284 | 389 | | |
285 | 390 | | |
286 | 391 | | |
287 | 392 | | |
288 | | - | |
| 393 | + | |
| 394 | + | |
289 | 395 | | |
290 | 396 | | |
291 | | - | |
| 397 | + | |
| 398 | + | |
0 commit comments