sqlite: prevent database close during callbacks - #64743
Merged
nodejs-github-bot merged 1 commit intoAug 4, 2026
Merged
Conversation
Collaborator
|
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #64743 +/- ##
=======================================
Coverage 90.16% 90.16%
=======================================
Files 746 746
Lines 242760 242784 +24
Branches 45765 45766 +1
=======================================
+ Hits 218875 218902 +27
+ Misses 15375 15367 -8
- Partials 8510 8515 +5
🚀 New features to boost your workflow:
|
mcollina
force-pushed
the
fix-sqlite-close-during-callback
branch
2 times, most recently
from
July 26, 2026 07:31
d3160fe to
822fbef
Compare
mertcanaltin
approved these changes
Jul 26, 2026
mertcanaltin
left a comment
Member
There was a problem hiding this comment.
I checked the guards in the base functions, and the window functions are covered too
and I looked fail test, this fail unrelated this pr
anonrig
approved these changes
Jul 26, 2026
geeksilva97
approved these changes
Jul 27, 2026
Collaborator
Co-authored-by: Asroy Cristian Sitorus <asroycristiansitorus@gmail.com> Signed-off-by: Matteo Collina <hello@matteocollina.com>
mcollina
force-pushed
the
fix-sqlite-close-during-callback
branch
from
July 30, 2026 20:21
822fbef to
a477a99
Compare
jasnell
approved these changes
Aug 2, 2026
Collaborator
Collaborator
|
Landed in 5cef767 |
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.
Prevent
DatabaseSync.close()from finalizing SQLite resources while a JavaScript callback is executing.SQLite invokes user-defined functions, aggregate functions, authorizers, and changeset callbacks synchronously during database operations. Previously, calling
database.close()from one of these callbacks could finalize active statements or the connection while native code was still using them.This change tracks callback depth and rejects reentrant closes with
ERR_INVALID_STATE. It also adds regression coverage forStatementSync.all(),get(),run(), anditerate().