MySQL document + projection stores - #8
Open
horner wants to merge 3 commits into
Open
Conversation
@yorm/drizzle shipped SQLite only. This adds a mysql2-backed pair behind the same contracts, validated by the adapter conformance suite. - schema-mysql.ts mirrors the SQLite system tables (varchar(191) keys so composite PKs fit InnoDB's index limit; datetime(3) round-trips exactly; longblob via customType, mysql-core has no blob column) - projection-store/shared.ts extracts everything dialect-agnostic so the two stores differ only in their upsert and reconcile SQL - the upsert uses ON DUPLICATE KEY UPDATE with VALUES(col) rather than MySQL 8.0.19's AS-new row alias, which MariaDB does not have - AdapterFactory gains sampleDdl: MySQL cannot put a primary key on TEXT - resolveBackend now resolves mysql and mariadb The MySQL suite runs when YORM_MYSQL_URL points at a server and skips otherwise.
yjs, hono and fhir use setTimeout, crypto and friends but got their Node types from the workspace root's devDependencies. That works when yorm is its own workspace and nowhere else: consumed as workspace members by another repo, `tsc -b` fails with "Cannot find name 'setTimeout'". A package that uses Node globals should say so.
…tions Idle pool connections killed server-side by wait_timeout stayed in the pool and failed their next query with PROTOCOL_CONNECTION_LOST, which 500'd websocket room opens until every stale connection was burned. Retire idles client-side (idleTimeout 60s, maxIdle 2) and enable TCP keepalive so the survivors stay healthy.
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.
Drizzle-backed MySQL stores for yorm documents and projections, plus resilience: the pool retires idle connections before the server's wait_timeout kills them (idleTimeout/maxIdle/keepalive), ending PROTOCOL_CONNECTION_LOST 500s on websocket room opens.
Dogfooded in mieweb/eCase, which pins this branch as a submodule.