René's URL Explorer Experiment


Title: `void/db` can't carry a D1 bookmark across requests · Issue #783 · voidzero-dev/void · GitHub

Open Graph Title: `void/db` can't carry a D1 bookmark across requests · Issue #783 · voidzero-dev/void

X Title: `void/db` can't carry a D1 bookmark across requests · Issue #783 · voidzero-dev/void

Description: Version void 1.7.0, and main at fecc1d4 Problem Follow-up to #755, which asked for two things. fecc1d4 shipped the first, createDb(env.DB, { session: 'first-primary' }), and closed the issue. The second, a bookmark that carries across re...

Open Graph Description: Version void 1.7.0, and main at fecc1d4 Problem Follow-up to #755, which asked for two things. fecc1d4 shipped the first, createDb(env.DB, { session: 'first-primary' }), and closed the issue. The s...

X Description: Version void 1.7.0, and main at fecc1d4 Problem Follow-up to #755, which asked for two things. fecc1d4 shipped the first, createDb(env.DB, { session: 'first-primary' }), and closed the issu...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`void/db` can't carry a D1 bookmark across requests","articleBody":"### Version\n\n`void` 1.7.0, and `main` at fecc1d4\n\n### Problem\n\nFollow-up to #755, which asked for two things. fecc1d4 shipped the first, `createDb(env.DB, { session: 'first-primary' })`, and closed the issue. The second, a bookmark that carries across requests, isn't tracked anywhere, so here it is on its own.\n\nEach request's `db` starts a new session on `first-unconstrained`. Within a request, reads see that request's writes. In the next request they may not: a write in one request followed by a read in the next can still reach a replica that hasn't caught up.\n\n`first-primary` fixes this one read at a time, but only if the app knows which reads follow a write. Most of the time it doesn't:\n\n- A form action saves and redirects, and the next page's loader shows the old data. Every loader that might run after any write would need `first-primary`, which gives up replicas for those pages entirely.\n- A user pays and the client visits a page gated on that payment. Reading the user with `first-primary` there works, but the page is reached in normal navigation far more often than after a payment, and those visits would lose the replica too. The same goes for every other page that shows the paid state.\n\nD1's own answer is the bookmark: save `session.getBookmark()` at the end of a request, and start the next request's session with `withSession(bookmark)`, so it sees at least everything the user has written.\n\nVoid can't do this yet, and neither can an app:\n\n- `createDb()`'s `session` option is a `D1SessionConstraint`, so it doesn't take a bookmark.\n- The request `db` doesn't expose its session's `getBookmark()`.\n\n### Proposal\n\nAn opt-in setting, such as `database: { bookmark: 'cookie' }` in `void.config.ts`. With it on, Void:\n\n1. starts each request's session from a bookmark cookie when there is one, and from `first-unconstrained` otherwise;\n2. sets the cookie to the session's `getBookmark()` when the response goes out, as `HttpOnly`, `SameSite=Lax`, with a short `Max-Age`, since a bookmark older than replica lag adds nothing.\n\nIf that's more than Void wants to own, the building blocks would let apps do it in middleware:\n\n- let `createDb()`'s `session` option take a bookmark string, as `withSession()` does;\n- expose the request session's bookmark, such as `getBookmark()` from `void/db`;\n- let middleware set the request `db`'s starting constraint or bookmark before the page runs.\n\n### Prior art\n\nRails' `DatabaseSelector` reads from the primary for a while after a user writes, tracked in the session cookie. Laravel's `sticky` option does the same within a request. Cloudflare's [read replication guide](https://developers.cloudflare.com/d1/best-practices/read-replication/) recommends passing the bookmark back to the client for exactly this case.\n","author":{"url":"https://github.com/karthickeyan-dev","@type":"Person","name":"karthickeyan-dev"},"datePublished":"2026-11-11T08:02:47Z","url":"https://github.com/voidzero-dev/void/issues/783"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:a10b11f2-444f-47dd-9310-06a14052c4cd
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA330:3B28F7:14D57A:1CD934:6AFB8BAD
html-safe-nonce43d540af9264ce4b0f9a375e767e7f2c9b2a6ab5cf5a97eee69ca39cbefabb84
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzMwOjNCMjhGNzoxNEQ1N0E6MUNEOTM0OjZBRkI4QkFEIiwidmlzaXRvcl9pZCI6Ijg5Njc2NjQyODAxNDQ2Nzc4MDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac45e7d4e6e101dcc737803830afc329c5f81bc7e5b638bcf2fbaa20952bb30599
hovercard-subject-tagissue:6324262132
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/783/issue_layout
twitter:imagehttps://opengraph.githubassets.com/33aca3441ffdc422095fa0da6e58f501e47e63fa8e81aadbe054f926b4c0ec54/voidzero-dev/void/issues/783
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/33aca3441ffdc422095fa0da6e58f501e47e63fa8e81aadbe054f926b4c0ec54/voidzero-dev/void/issues/783
og:image:altVersion void 1.7.0, and main at fecc1d4 Problem Follow-up to #755, which asked for two things. fecc1d4 shipped the first, createDb(env.DB, { session: 'first-primary' }), and closed the issue. The s...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamekarthickeyan-dev
hostnamegithub.com
expected-hostnamegithub.com
None9694464143465782ecae2a97650b2a2b0708d5c31c74f41ee86da57e315e2735
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
release05d967182208691fc7f2e6af52e82fa7fabf6bd5
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/voidzero-dev/void/issues/783#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fvoidzero-dev%2Fvoid%2Fissues%2F783
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%2F783
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/783
Reloadhttps://github.com/voidzero-dev/void/issues/783
Reloadhttps://github.com/voidzero-dev/void/issues/783
voidzero-devhttps://github.com/voidzero-dev
voidhttps://github.com/voidzero-dev/void
Codehttps://github.com/voidzero-dev/void
Issues31 (31)https://github.com/voidzero-dev/void/issues
Pull requests16 (16)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/783
New issuehttps://github.com/login?return_to=https://github.com/voidzero-dev/void/issues/783
#813https://github.com/voidzero-dev/void/pull/813
void/db can't carry a D1 bookmark across requestshttps://github.com/voidzero-dev/void/issues/783#top
#813https://github.com/voidzero-dev/void/pull/813
https://github.com/kossnocorp
https://github.com/karthickeyan-dev
karthickeyan-devhttps://github.com/karthickeyan-dev
on Nov 11, 2026https://github.com/voidzero-dev/void/issues/783#issue-6324262132
fecc1d4https://github.com/voidzero-dev/void/commit/fecc1d4662bc8dfa4608c60b5d09b2da898a251b
#755https://github.com/voidzero-dev/void/issues/755
fecc1d4https://github.com/voidzero-dev/void/commit/fecc1d4662bc8dfa4608c60b5d09b2da898a251b
read replication guidehttps://developers.cloudflare.com/d1/best-practices/read-replication/
kossnocorphttps://github.com/kossnocorp
on Nov 11, 2026https://github.com/voidzero-dev/void/issues/783#event-35784068098
https://github.com/kossnocorp
kossnocorphttps://github.com/kossnocorp
on Nov 11, 2026https://github.com/voidzero-dev/void/issues/783#issuecomment-6792770510
kossnocorphttps://github.com/kossnocorp
on Nov 16, 2026https://github.com/voidzero-dev/void/issues/783#event-36226677382
fix: add repro tests for #783https://github.com/voidzero-dev/void/commit/f1227733f2e6554cfea49333cff185fbd55239d4
#783https://github.com/voidzero-dev/void/issues/783
f122773https://github.com/voidzero-dev/void/commit/f1227733f2e6554cfea49333cff185fbd55239d4
fix: add repro tests for #783https://github.com/voidzero-dev/void/commit/3deb84486a0b28d65c3aa5d8e0af7cf0a236b8d6
#783https://github.com/voidzero-dev/void/issues/783
3deb844https://github.com/voidzero-dev/void/commit/3deb84486a0b28d65c3aa5d8e0af7cf0a236b8d6
fix: add repro tests for #783https://github.com/voidzero-dev/void/commit/f69a3e4d1d2bc140e29be21e9e60aa3f9e2392f8
#783https://github.com/voidzero-dev/void/issues/783
f69a3e4https://github.com/voidzero-dev/void/commit/f69a3e4d1d2bc140e29be21e9e60aa3f9e2392f8
Sign up for freehttps://github.com/signup?return_to=https://github.com/voidzero-dev/void/issues/783
Sign in to commenthttps://github.com/login?return_to=https://github.com/voidzero-dev/void/issues/783
kossnocorphttps://github.com/kossnocorp
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.