Skip to content

fix(fork): merge upstream b23f94e into patch/sqlite-reader-pool - #263

Merged
fireboltdude1357 merged 213 commits into
patch/sqlite-reader-poolfrom
fix/sqlite-reader-pool-upstream-b23f94e
Nov 13, 2026
Merged

fireboltdude1357 merged 213 commits into
patch/sqlite-reader-poolfrom
fix/sqlite-reader-pool-upstream-b23f94e

Conversation

@fireboltdude1357

Copy link
Copy Markdown
Owner

The fork's nightly build fails because patch/sqlite-reader-pool conflicts with upstream b23f94e in packages/shared/src/nodeSqliteClient.ts (6 hunks).

Upstream pingdotgg#35728 moves the writer onto a worker thread and rewrites the file around a shared makeWorkerConnection. It still routes reads by claim count over 4 readers, each with its own Semaphore(1), so a new read can overtake one that is already waiting.

I kept upstream's makeWorkerConnection, makeReader, writer worker, checkpoint worker and READER_POOL_SIZE exactly as they are. The patch's ordered pool is back as makeReaderPool(filename), built over upstream's makeReader:

  • the lowest free slot goes out first;
  • waiters are served in arrival order;
  • when the readers turn off, queued reads move to the writer in order;
  • a slot taken by an interrupted caller goes straight to the next waiter.

route's reader branch now leases a slot from that pool and falls back to upstream's writer. Readers no longer take a per-reader lock, because the slot already gives them the connection alone. db.lock_wait_ms for a reader counts the time spent waiting for a slot.

nodeSqliteClient.test.ts passes, with 27 tests including the patch's 4 pool tests. pingdotgg#35728's Sqlite.test.ts, FoundationPersistence.test.ts and ProjectService.test.ts pass too.

On a scratch stack of upstream b23f94e with all 26 patches and this branch, pnpm install --no-frozen-lockfile, vp run typecheck (41 of 41) and vp test run on the test files the patches touch, plus those upstream tests, all pass (51 files, 1439 tests).

Made by Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

juliusmarminge and others added 30 commits November 12, 2026 11:35
…on box (pingdotgg#32682)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
Co-authored-by: Yash Singh <saiansh2525@gmail.com>
…35565)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ingdotgg#32302)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ping each key (pingdotgg#35581)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…card (pingdotgg#31115)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Yash Singh <saiansh2525@gmail.com>
…t pull (pingdotgg#26568)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…after a full scan (pingdotgg#33993)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ls (pingdotgg#27928)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…rrow viewports (pingdotgg#29288)

Co-authored-by: imluckii <imluckii@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…1723)

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
…in worktrees (pingdotgg#33923)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…its for its status read (pingdotgg#33877)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…r (median 7,826 to 3,168 ms) (pingdotgg#33954)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…otgg#33858)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ly (pingdotgg#33896)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…worktrees (pingdotgg#33908)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
hieu-lee and others added 29 commits November 12, 2026 18:23
… pass (pingdotgg#26935)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ingdotgg#35783)

* feat(mobile): secret field gets an eye toggle to show what you typed
…t frame (pingdotgg#35683)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…us (pingdotgg#23141)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…#29452)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…p tabs (pingdotgg#32854)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
# Conflicts:
#	packages/shared/src/nodeSqliteClient.ts
@fireboltdude1357
fireboltdude1357 merged commit 4a7132b into patch/sqlite-reader-pool Nov 13, 2026
4 checks passed
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.