René's URL Explorer Experiment


Title: `void/db` can't start on the D1 primary or carry a bookmark across requests · Issue #755 · voidzero-dev/void · GitHub

Open Graph Title: `void/db` can't start on the D1 primary or carry a bookmark across requests · Issue #755 · voidzero-dev/void

X Title: `void/db` can't start on the D1 primary or carry a bookmark across requests · Issue #755 · voidzero-dev/void

Description: Version void 1.7.0 Problem Follow-up to #337, which asked for read replication and per-request sessions. During a request, db from void/db always starts with withSession('first-unconstrained'), and each request gets a new session. That c...

Open Graph Description: Version void 1.7.0 Problem Follow-up to #337, which asked for read replication and per-request sessions. During a request, db from void/db always starts with withSession('first-unconstrained'), and...

X Description: Version void 1.7.0 Problem Follow-up to #337, which asked for read replication and per-request sessions. During a request, db from void/db always starts with withSession('first-unconstrained...

Opengraph URL: https://github.com/voidzero-dev/void/issues/755

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`void/db` can't start on the D1 primary or carry a bookmark across requests","articleBody":"### Version\n\n`void` 1.7.0\n\n### Problem\n\nFollow-up to #337, which asked for read replication and per-request sessions.\n\nDuring a request, `db` from `void/db` always starts with `withSession('first-unconstrained')`, and each request gets a new session. That covers read-your-writes within one request, but not across requests: a write followed by a read in the next request can reach a replica that hasn't caught up.\n\nThe D1 guide says to handle this like so:\n\n> If another read must start with the latest primary data, use `env.DB.withSession('first-primary')` from `cloudflare:workers`.\n\nThat's the raw D1 API, and there's no supported way to run Drizzle queries on it:\n\n- `createDb()` calls `withSession('first-unconstrained')` itself, so it can't be given a different constraint.\n- `createPrimaryDb()` exists in `src/runtime/db.ts`, but it's private and only used outside a request.\n- Using `drizzle()` directly needs `drizzle-orm` as a dependency, and `void/db` is meant to replace that.\n\nSo a read that must be fresh has to become raw SQL with hand-written row types.\n\nThis affects common flows:\n\n- A form saves and redirects, and the next page's loader shows the old data.\n- A user pays and is sent to a page gated on that payment, and a replica says they haven't paid.\n- A webhook looks up a row created by an earlier request and doesn't find it.\n\n### Proposal\n\n1. A way to get a Drizzle `db` that starts on the primary and keeps the app's schema, such as `createDb(env.DB, { session: 'first-primary' })` or an exported `primaryDb`.\n2. An opt-in bookmark that carries across requests: Void saves `getBookmark()` in a cookie when a request ends and starts the next request's session from it, so a user always sees their own writes.\n\nEither one would solve the gated-page case. The first suits individual reads and also covers webhooks, which have no cookie. The second fixes the redirect-after-write case across a whole app.\n\n### Prior art\n\nRails' `DatabaseSelector` and Laravel's `sticky` option both send a user's reads to the primary after they write.\n","author":{"url":"https://github.com/karthickeyan-dev","@type":"Person","name":"karthickeyan-dev"},"datePublished":"2026-11-09T08:30:23Z","url":"https://github.com/voidzero-dev/void/issues/755"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:3bbf791c-94cc-b62d-8306-3c383061f0f9
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE3A8:3497D1:458052:5F6949:6AFB9C87
html-safe-nonce2379b0ff97f34f953d833d3840bff09b154ae56c208dbb265cb6552c4dd32cd5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFM0E4OjM0OTdEMTo0NTgwNTI6NUY2OTQ5OjZBRkI5Qzg3IiwidmlzaXRvcl9pZCI6IjI1MDQyNjMzNDg5NjMyMjA2MTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacb1e3a55d1cd41113628dc79992327eb17bf7e7b1ced52d42c61f0992421f3eda
hovercard-subject-tagissue:6282651919
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/voidzero-dev/void/755/issue_layout
twitter:imagehttps://opengraph.githubassets.com/bd4302ab803e1ff855303776ab1dff1e3af3e5203e6505c73bfe1ea0bc5365be/voidzero-dev/void/issues/755
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/bd4302ab803e1ff855303776ab1dff1e3af3e5203e6505c73bfe1ea0bc5365be/voidzero-dev/void/issues/755
og:image:altVersion void 1.7.0 Problem Follow-up to #337, which asked for read replication and per-request sessions. During a request, db from void/db always starts with withSession('first-unconstrained'), and...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamekarthickeyan-dev
hostnamegithub.com
expected-hostnamegithub.com
None3cefd19a936819d82cfb5279d50fb56fe79cb9ec30f0f807e04e89b0c58ffae1
turbo-cache-controlno-preview
go-importgithub.com/voidzero-dev/void git https://github.com/voidzero-dev/void.git
octolytics-dimension-user_id149750581
octolytics-dimension-user_loginvoidzero-dev
octolytics-dimension-repository_id1164437080
octolytics-dimension-repository_nwovoidzero-dev/void
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1164437080
octolytics-dimension-repository_network_root_nwovoidzero-dev/void
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release606800bdb1b81d125fc845bdcc262c9fe063fc8f
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/voidzero-dev/void/issues/755#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fvoidzero-dev%2Fvoid%2Fissues%2F755
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fvoidzero-dev%2Fvoid%2Fissues%2F755
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=voidzero-dev%2Fvoid
Reloadhttps://github.com/voidzero-dev/void/issues/755
Reloadhttps://github.com/voidzero-dev/void/issues/755
Reloadhttps://github.com/voidzero-dev/void/issues/755
voidzero-devhttps://github.com/voidzero-dev
voidhttps://github.com/voidzero-dev/void
Codehttps://github.com/voidzero-dev/void
Issues30 (30)https://github.com/voidzero-dev/void/issues
Pull requests13 (13)https://github.com/voidzero-dev/void/pulls
Discussionshttps://github.com/voidzero-dev/void/discussions
Actionshttps://github.com/voidzero-dev/void/actions
Security and qualityhttps://github.com/voidzero-dev/void/security
Insightshttps://github.com/voidzero-dev/void/pulse
https://github.com/voidzero-dev/void
New issuehttps://github.com/login?return_to=https://github.com/voidzero-dev/void/issues/755
New issuehttps://github.com/login?return_to=https://github.com/voidzero-dev/void/issues/755
void/db can't start on the D1 primary or carry a bookmark across requestshttps://github.com/voidzero-dev/void/issues/755#top
https://github.com/cpojer
https://github.com/karthickeyan-dev
karthickeyan-devhttps://github.com/karthickeyan-dev
on Nov 9, 2026https://github.com/voidzero-dev/void/issues/755#issue-6282651919
#337https://github.com/voidzero-dev/void/issues/337
cpojerhttps://github.com/cpojer
on Nov 10, 2026https://github.com/voidzero-dev/void/issues/755#event-35647045962
cpojerhttps://github.com/cpojer
on Nov 10, 2026https://github.com/voidzero-dev/void/issues/755#event-35647268302
Allow Drizzle D1 clients to start sessions on primary, refs #755.https://github.com/voidzero-dev/void/commit/fecc1d4662bc8dfa4608c60b5d09b2da898a251b
#755https://github.com/voidzero-dev/void/issues/755
fecc1d4https://github.com/voidzero-dev/void/commit/fecc1d4662bc8dfa4608c60b5d09b2da898a251b
cpojerhttps://github.com/cpojer
completedhttps://github.com/voidzero-dev/void/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Nov 10, 2026https://github.com/voidzero-dev/void/issues/755#event-35647383184
Sign up for freehttps://github.com/signup?return_to=https://github.com/voidzero-dev/void/issues/755
Sign in to commenthttps://github.com/login?return_to=https://github.com/voidzero-dev/void/issues/755
cpojerhttps://github.com/cpojer
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.