Repository navigation
fix(tables): log row writes to the change log instead of locking the table definition row - #8765
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
We detected this is a high-risk PR and are running a free ultrareview. An ultrareview is a deeper, multi-pass review that catches hard-to-find bugs a standard review can miss. We'll post the findings when it completes. This PR appears to change a database schema or migrate data, where a missed bug can corrupt or lose records, so a deeper multi-pass review is worth running. Want an ultrareview on every high-risk PR? Set up automated ultrareviews. |
|
There was a problem hiding this comment.
We detected this is a high-risk PR and ran a free ultrareview. An ultrareview is a deeper, multi-pass review that catches hard-to-find bugs a standard review can miss.
This PR appears to change a database schema or migrate data, where a missed bug can corrupt or lose records, so a deeper multi-pass review is worth running.
Want an ultrareview on every high-risk PR? Set up automated ultrareviews.
All reported issues were addressed across 9 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
1288e3b to
a999be1
Compare
|
@greptile review |
|
@greptile review |
…table definition row
…tighten the held-row test
8eabf8a to
e79bbff
Compare
Summary
user_table_rowstriggers append touser_table_row_changesinstead of updating the table'suser_table_definitionsrow, so a row write no longer locks shared per-table state. A commit stalled on synchronous replication no longer makes every other writer to that table queue behind it and fail at the 3 slock_timeout+n/-nrow per table per statement — that row is both the row-count delta and the version bump, replacing the row-count triggers (0224) and the version insert/delete triggers (0240, dropped). The deferred update trigger (0390) keeps its column filter and per-transaction dedupe and logs a zero-delta rowapply-dev-table-triggers.tsinstalls the same functions and reconciles stored + tail against real counts; stale comments about the trigger lock updatedType of Change
Testing
row-writes.integration.tscase: a second session holds the definition rowFOR NO KEY UPDATE(what a commit stuck in SyncRep holds) while insert, batch insert, upsert, update by id, update by filter, delete by filter, and replace each run. All seven commit (56 ms total) and live count =COUNT(*). Against the pre-change triggers the first insert fails at the 3 s lock timeoutrows_versionand TTL helpers now read stored + tailbun run lint,check:audits,check:migrations origin/staging, block-registry check,docs-manifest:check, drizzle generate clean, 1,011 table unit tests; rootbun run testgreen except one desktop terminal test that passes in isolationChecklist
test-auditauthoring gate)🤖 Generated with Claude Code
https://claude.ai/code/session_01CJxC2fgucGVpT59RV5Z7xv