2.1.0 / 2024-09-24 #567
flavorjones
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
2.1.0 / 2024-09-24
Ruby
Fork safety improvements
Sqlite itself is not fork-safe. Specifically, writing in a child process to a database connection that was created in the parent process may corrupt the database file. To mitigate this risk, sqlite3-ruby has implemented the following changes:
fork()
will immediately be closed in the child process to mitigate the risk of corrupting the database file.If it's at all possible, we strongly recommend that you close writable database connections in the parent before forking. If absolutely necessary (and you know what you're doing), you may suppress the fork safety warnings by calling
SQLite3::ForkSafety.suppress_warnings!
.See the README's "Fork Safety" section and
adr/2024-09-fork-safety.md
for more information. [#558, #565, #566] @flavorjonesImproved
sqlite3_close_v2
to close databases in a deferred manner if there are unclosed prepared statements. Previously closing a database while statements were open resulted in aBusyException
. See https://www.sqlite.org/c3ref/close.html for more context. [Use sqlite3_close_v2 to close databases. #557] @flavorjonesbusy_handler
, fire the write barrier to prevent potential crashes during the GC mark phase. [Use write barrier when setting busy_handler #556] @jhawthornDocumentation
FAQ.md
has been updated to fix some inaccuracies. [Update FAQ.md #562] @rickhullNew Contributors
Full Changelog: v2.0.4...v2.1.0
sha256 checksums:
This discussion was created from the release 2.1.0 / 2024-09-24.
Beta Was this translation helpful? Give feedback.
All reactions