Skip to content

2.1.0.rc1 / 2024-09-18

Pre-release
Pre-release
Compare
Choose a tag to compare
@flavorjones flavorjones released this 18 Sep 16:25
· 26 commits to main since this release
81ea485

prerelease 2.1.0.rc1 / 2024-09-18

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:

  • All open writable database connections carried across a fork() will immediately be closed in the child process to mitigate the risk of corrupting the database file.
  • These connections will be incompletely closed ("discarded") which will result in a one-time memory leak in the child process.

If it's at all possible, we strongly recommend that you close writable database connections in the parent before forking.

See the README "Fork Safety" section and adr/2024-09-fork-safety.md for more information. [#558] @flavorjones

Improved

  • Use 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 a BusyException. See https://www.sqlite.org/c3ref/close.html for more context. [#557] @flavorjones
  • When setting a Database busy_handler, fire the write barrier to prevent potential crashes during the GC mark phase. [#556] @jhawthorn

New Contributors


Full Changelog: v2.0.4...v2.1.0.rc1


sha256 checksums:

581e71a914d20c5fe393854f0197391b8df0e68d4c1db06cba5b29ed0dde6a9b  sqlite3-2.1.0.rc1-aarch64-linux-gnu.gem
b81cf70e7e78ef22efa9770a6a9589384e269724af3ea15c357b3d76c10d6861  sqlite3-2.1.0.rc1-aarch64-linux-musl.gem
e4cf6892d9459fc0f5afb6f133a93a23df78ee4102f3145d3b89f5130bb6e069  sqlite3-2.1.0.rc1-arm64-darwin.gem
194385869744cec0a61607829d2620156157d246ec2b3a5419986fb783e5e45f  sqlite3-2.1.0.rc1-arm-linux-gnu.gem
eb0b281ba86e6e0ebd933dd1b9c0d83171b2b900dac3b8d311189e9d8bbf94e8  sqlite3-2.1.0.rc1-arm-linux-musl.gem
e394e30406995c47eccae3a957adb4fb27632dd1cc09127d163d182b7ba46cf0  sqlite3-2.1.0.rc1.gem
04edd5816041a611bcde70dd42aa0f1d8cfa2c32beb7b934b80234dc84668449  sqlite3-2.1.0.rc1-x64-mingw-ucrt.gem
f4fb75d456547fbc88df4d2c8699e42ea1011a00addfe7b69f9d018bb820982b  sqlite3-2.1.0.rc1-x86_64-darwin.gem
a741c973c3ad2ae2d37e0acd0851c1a6942f3c0d1a0646ff60ce624cc261eb4e  sqlite3-2.1.0.rc1-x86_64-linux-gnu.gem
f26b906629825107b12ce075db5eca4f7a446bf5147b4c51961847bb23a28d8e  sqlite3-2.1.0.rc1-x86_64-linux-musl.gem
498112a306a5bbd642a39c0a1744b6329a6dc773550064c3dcdf7dea4aa88c6c  sqlite3-2.1.0.rc1-x86-linux-gnu.gem
b1dd36d98896ff736fc4af3af170b3341439f18625c579f43c8f3b19165028e4  sqlite3-2.1.0.rc1-x86-linux-musl.gem