Repository navigation
Recognize sqlite-do transactions in SqlResolver batches - #9951
Merged
Merged
Conversation
…nd narrow the changeset
🦋 Changeset detectedLatest commit: ee073dc The changes in this PR will be included in the next version bump. This PR includes changesets to release 33 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|
Drop SqlClient.addTransaction: with sqlite-do on makeWithTransaction, SqlResolver recognizes its transactions without a new export.
tim-smart
enabled auto-merge (squash)
October 26, 2026 23:17
Merged
effect-bot
pushed a commit
to yordis/effect
that referenced
this pull request
Oct 27, 2026
The tests added on main in Effect-TS#9951 pass plain arrays to sql.insert, which requires a non-empty array on v4/next-minor since Effect-TS#9453.
effect-bot
pushed a commit
to wmaurer/effect
that referenced
this pull request
Oct 27, 2026
The tests added on main in Effect-TS#9951 pass plain arrays to sql.insert, which requires a non-empty array on v4/next-minor since Effect-TS#9453.
effect-bot
pushed a commit
to wmaurer/effect
that referenced
this pull request
Oct 27, 2026
The tests added on main in Effect-TS#9951 pass plain arrays to sql.insert, which requires a non-empty array on v4/next-minor since Effect-TS#9453.
effect-bot
pushed a commit
to wmaurer/effect
that referenced
this pull request
Oct 27, 2026
The tests added on main in Effect-TS#9951 pass plain arrays to sql.insert, which requires a non-empty array on v4/next-minor since Effect-TS#9453.
effect-bot
pushed a commit
to wmaurer/effect
that referenced
this pull request
Oct 27, 2026
The tests added on main in Effect-TS#9951 pass plain arrays to sql.insert, which requires a non-empty array on v4/next-minor since Effect-TS#9453.
effect-bot
pushed a commit
to wmaurer/effect
that referenced
this pull request
Oct 28, 2026
The tests added on main in Effect-TS#9951 pass plain arrays to sql.insert, which requires a non-empty array on v4/next-minor since Effect-TS#9453.
effect-bot
pushed a commit
to wmaurer/effect
that referenced
this pull request
Oct 28, 2026
The tests added on main in Effect-TS#9951 pass plain arrays to sql.insert, which requires a non-empty array on v4/next-minor since Effect-TS#9453.
effect-bot
pushed a commit
to wmaurer/effect
that referenced
this pull request
Oct 28, 2026
The tests added on main in Effect-TS#9951 pass plain arrays to sql.insert, which requires a non-empty array on v4/next-minor since Effect-TS#9453.
effect-bot
pushed a commit
to wmaurer/effect
that referenced
this pull request
Oct 28, 2026
The tests added on main in Effect-TS#9951 pass plain arrays to sql.insert, which requires a non-empty array on v4/next-minor since Effect-TS#9453.
effect-bot
pushed a commit
to wmaurer/effect
that referenced
this pull request
Oct 28, 2026
The tests added on main in Effect-TS#9951 pass plain arrays to sql.insert, which requires a non-empty array on v4/next-minor since Effect-TS#9453.
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.
@effect/sql-sqlite-doimplementedwithTransactionitself, so theSqlResolverfallback from #9928 couldn't see its transactions. When the callers' context had noSqlClient, requests inside and outside a storage transaction shared a batch. That batch either hung on the connection or ran the outside write inside the transaction, where a rollback discarded it.sqlite-do now builds
withTransactionwithSqlClient.makeWithTransaction, like libsql and mssql:beginandsavepointopenstorage.transaction()and park its callback, so the body runs on the fiber.commitandreleaseSavepointend the callback and wait for storage.rollbackandrollbackSavepointcalltxn.rollback()first.Storage sees the same calls in the same order. No new API in
effect. The changeset lists the behaviour changes this brings, and the sqlite-do notes are removed from theSqlResolver,withTransactionandafterCommitdocs.The regression test in
packages/sql/sqlite-do/test/Client.test.tsruns a write inside a rolled-back storage transaction next to a concurrent write outside it, with noSqlClientin context. It expects batches[[2], [1]]and rows[{ id: 2 }]. Before the fix it hung.This branch is based on #9928, whose commits show here until it merges.
Closes EFF-2940