mirror of
https://github.com/zeronsh/comet.git
synced 2026-11-16 18:57:19 +00:00
chat2: a checkpoint past one request's most goes in parts
The edge takes at most 32 MiB of checkpoint in one request; a long chat's
snapshot outgrew it (139d8682: 35 MB, da5bd3cc: 39 MB, its state alone
~20 MB), so every post was refused 413 and those rooms kept no checkpoint.
- Edge: `POST /chat2/{id}/checkpoint-part?offset=` appends a piece (at most
8 MiB) to the room's staged checkpoint, kept as the blob store's chunk
rows; `POST /checkpoint?seqCovered=&staged=<size>` commits it by renaming
those rows, with the same floor and head guards (and `incomplete` when
it isn't all there). GET /checkpoint streams it a row at a time (Range as
before), and the nightly backup writes a large one as an object of its
own, streamed, so the room never holds one whole. A single POST, its
32 MiB cap and its 413 are as they were.
- Engine (src/chat2_checkpoint.rs): up to 32 MiB, one POST as always; past
it, parts then the commit. An edge from before parts answers 404 and the
room stays as it was.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
This commit is contained in:
parent
956e887be7
commit
3182a97026
10 changed files with 501 additions and 42 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
Loading…
Add table
Add a link
Reference in a new issue