fix(runtime): store SQL sessions as entries with chunked blobs#241
Open
mhart wants to merge 1 commit into
Open
fix(runtime): store SQL sessions as entries with chunked blobs#241mhart wants to merge 1 commit into
mhart wants to merge 1 commit into
Conversation
cec8df8 to
20fcf5e
Compare
20fcf5e to
a45259a
Compare
Fixes session persistence failures on Cloudflare Durable Object SQLite when session history contains large inline image/blob content. This changes SQL-backed session storage from one JSON blob per session to: - one metadata row per session - one row per session entry - chunked external rows for image/blob/document/file content Large image data is rehydrated on session load, so model context remains unchanged while avoiding Cloudflare SQLite’s 2MB per-cell string/blob limit in normal usage. Fixes withastro#240
a45259a to
da94b41
Compare
Member
|
Closed, fixed in 1815fb9. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes session persistence failures on Cloudflare Durable Object SQLite when session history contains large inline image/blob content.
This changes SQL-backed session storage from one JSON blob per session to:
Large image data is rehydrated on session load, so model context remains unchanged while avoiding Cloudflare SQLite’s 2MB per-cell string/blob limit in normal usage.
Fixes #240
NOTE This is just one approach – another would be to persist large attachments to an external object store, like R2 – will explore that in a separate PR