Skip to content

Remove the D1-to-R2 oversized-value offload#967

Merged
RhysSullivan merged 1 commit into
mainfrom
remove-d1-blob-offload
Jun 12, 2026
Merged

Remove the D1-to-R2 oversized-value offload#967
RhysSullivan merged 1 commit into
mainfrom
remove-d1-blob-offload

Conversation

@RhysSullivan

@RhysSullivan RhysSullivan commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

What

Deletes the transparent D1 driver wrap that intercepted bound parameters >800KB, stashed them in R2 under a content hash, and rehydrated pointer strings on read. createD1ExecutorDb hands drizzle the raw D1Database; the handle's blob-seam backend (makeR2BlobStore) is unchanged.

Why it existed, why it can go

It existed only because resolved OpenAPI specs were inlined in integration.config and D1 caps a value at ~1-2MB. Specs now live in the blob seam, written straight to R2, so nothing that flows through D1 approaches the cap: across the whole production fleet the largest non-spec values are tool rows ~165KB, definitions ~256KB, and plugin_storage ~206KB.

Safety

The canonical deployment's database was scanned for offload pointer strings before removal — zero exist in any table, so this is code-only. A deployment that still had legacy oversized rows stored as pointers would need the spec backfill before taking this change.

maxBoundParameters: 100 stays — that's D1's parameter-count platform limit, unrelated to value size.

Testing

The workerd e2e still pushes a ~1MB spec through the real worker; it now proves the spec lands in the R2 blob seam rather than the offload. Full gates green.

Stack

  1. Remove the D1-to-R2 oversized-value offload #967 👈 current
  2. Move inline specs to the blob table at boot on the libSQL hosts #968
  3. Drop the inline-spec read paths; pointer configs are the only shape #969
  4. Project the heavy schema columns off the tool hot paths #970

The transparent D1 driver wrap (intercept bound params >800KB, stash in
R2 under a content hash, rehydrate pointer strings on read) existed only
because resolved OpenAPI specs were inlined in integration.config and
D1 caps a value at ~1-2MB. Specs now live in the blob seam, written
straight to R2 through the handle's blobs backend, so nothing that flows
through D1 approaches the cap: across the whole fleet the largest
non-spec values are tool rows ~165KB, definitions ~256KB, and
plugin_storage ~206KB.

The canonical deployment's database was scanned for offload pointer
strings before removal — zero exist in any table, so this is code-only.
A deployment that still had legacy oversized rows stored as pointers
would need the spec backfill before taking this change.

The workerd e2e still pushes a ~1MB spec through the real worker; it now
proves the spec lands in the R2 blob seam rather than the offload.
maxBoundParameters stays — that is D1's parameter-count platform limit,
unrelated to value size.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 12, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing bfcedc6 Commit Preview URL

Branch Preview URL
Jun 12 2026, 05:25 AM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 12, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud bfcedc6 Jun 12 2026, 05:26 AM

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Cloudflare preview

Torn down — the PR is closed.

@pkg-pr-new

pkg-pr-new Bot commented Jun 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

@executor-js/cli

npm i https://pkg.pr.new/@executor-js/cli@967

@executor-js/config

npm i https://pkg.pr.new/@executor-js/config@967

@executor-js/execution

npm i https://pkg.pr.new/@executor-js/execution@967

@executor-js/sdk

npm i https://pkg.pr.new/@executor-js/sdk@967

@executor-js/codemode-core

npm i https://pkg.pr.new/@executor-js/codemode-core@967

@executor-js/runtime-quickjs

npm i https://pkg.pr.new/@executor-js/runtime-quickjs@967

@executor-js/plugin-file-secrets

npm i https://pkg.pr.new/@executor-js/plugin-file-secrets@967

@executor-js/plugin-graphql

npm i https://pkg.pr.new/@executor-js/plugin-graphql@967

@executor-js/plugin-keychain

npm i https://pkg.pr.new/@executor-js/plugin-keychain@967

@executor-js/plugin-mcp

npm i https://pkg.pr.new/@executor-js/plugin-mcp@967

@executor-js/plugin-onepassword

npm i https://pkg.pr.new/@executor-js/plugin-onepassword@967

@executor-js/plugin-openapi

npm i https://pkg.pr.new/@executor-js/plugin-openapi@967

executor

npm i https://pkg.pr.new/executor@967

commit: bfcedc6

@RhysSullivan RhysSullivan merged commit 6d0ad93 into main Jun 12, 2026
14 checks passed
@RhysSullivan RhysSullivan deleted the remove-d1-blob-offload branch June 12, 2026 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant