Repository navigation
Conversation
🦋 Changeset detectedLatest commit: 81d77a9 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.
|
This branch is waiting to be deployed
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.
The PGlite, libSQL and Durable Object SQLite clients can hang forever after a queued query or
withTransactionis interrupted just as it gets the connection. The connection's only permit stays taken, so every later query waits. This is the leak #9957 reported and #9962 fixed for the shared SQLite clients in 4.1.0; these three clients build their own leases and were not changed.Running #9962's regression sweep against each client on 4.1.0 (and on
main):PgliteClient, theSqliteClientin@effect/sql-sqlite-doandLibsqlClient's statement lease useEffect.acquireRelease(semaphore.take(1), () => semaphore.release(1), { interruptible: true }), andLibsqlClient's transactionacquireConnectionusesrestore(semaphore.take(1))followed byEffect.addFinalizer. In both shapestakecounts the permit as taken before the release is registered, so an interrupt in between leaves it taken.They now use
semaphore.takeScoped(1), asmakeSqliteAcquirersdoes since #9962: the wait stays interruptible, and taking the permit and adding its release to the scope happen in one uninterruptible step. The test ports #9962's delay sweep to the PGlite client for both a transaction and a plain statement. libSQL's tests need a container and the Durable Object client runs under Miniflare, so those two are covered by the same change rather than their own test; the libSQL rows above were rerun with this branch'sLibsqlClient.tsand no longer wedge.