-
Notifications
You must be signed in to change notification settings - Fork 204
Initial Ractor support #365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
10e89a1
to
fea5c83
Compare
fea5c83
to
e116ba5
Compare
Is there any outstanding feedback here? Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems fine to me. I haven't investigated everything we need to do to make C extensions Ractor safe but I think this is fine to start with!
Great, I'll rebase and merge it today or tomorrow. |
e116ba5
to
54959e6
Compare
So it seems like in Ruby 3.3, trying to pass a I'm not sure if this is intentional behavior or not. @sandlerr or @tenderlove do you know? Edit: to be explicit, the RemoteError is wrapping |
OK, that exception started to get raised in ruby/ruby@ce47ee00 as a fix, so I'm just going to adapt the test to the different behaviors before and after 3.3.0. |
0f4db3d
to
104ea23
Compare
The stress test hangs under Ruby 3.3 with as few as 3 ractor writers, and it's not clear to me why. |
104ea23
to
6ccb27b
Compare
* main: (215 commits) version bump to v2.6.0 Database#enable_load_extension def only if extensions are available dep: update vendored sqlite to v3.49.1 dep: update vendored sqlite to 3.49.0 dep: update vendored sqlite to 3.48.0 build(deps-dev): update rdoc requirement from 6.11.0 to 6.12.0 dev: Add rake task `test:gdb` fix: tests pass on bigendian architecture dep: move style and docs deps into a separate group ci: test-gem-install should use `[` not `[[` test: skip database URI tests when using system libraries doc: update CHANGELOG dep: update rake-compiler-dock to v1.9.1 build(deps-dev): update rdoc requirement from 6.10.0 to 6.11.0 dep(doc): fixing psych installation on alpine dep(test): remove implicit dependence on benchmark gem build(deps-dev): update ruby_memcheck requirement from 3.0.0 to 3.0.1 dep: update rake-compiler-dock to v1.8.0 build(deps-dev): update rake-compiler requirement from 1.2.8 to 1.2.9 ci: bump test image tag from 3.4-rc to 3.4 ...
https://www.sqlite.org/threadsafe.html "Full mutex" mode is the only time when a SQLite database can be shared between multiple threads. Multi-thread mode only means that multiple threads can have their own instances of a database object that point at the same file, but multiple threads cannot access the object concurrently.
* main: build(deps-dev): update rdoc requirement from 6.12.0 to 6.13.0 ci: get upstream sqlite-head job green build(deps-dev): update minitest requirement from 5.25.4 to 5.25.5 Add parameter checking for string value pragmas Simplify PRAGMA related constants Add some regression tests for setting pragmas Freeze strings and constants in pragmas
f55eb82
to
36af661
Compare
I made some updates to this branch and included a RACTOR.md file that describes Ractor support. Also I removed the "Ractor smoke test" test because I think it's just testing the guarantees that the SQLite library makes and not testing our APIs. @flavorjones please take a look at the |
TruffleRuby support
433c2d3
to
ac5605d
Compare
Rebased onto |
ac5605d
to
d721e37
Compare
Looks like the FreeBSD build is failing, not sure if it's related or not:
I'll re-run it in case it's a flake. |
@tenderlove It looks like there are still problems with this branch. Looks like a few other tests have deadlocked or are hanging, in addition to FreeBSD. |
I may have rebased this incorrectly ... not sure what's going on but when I rebase RACTOR.md disappears. I'll come back to it later today. |
I think I accidentally committed to the merge commit. I can fix up the commits (but it'll be a while) |
I was going to ask if we do any forking in the tests, but we have the fork tracker, so clearly we do. IIRC there are problems with Ractors and forking such that we can't create a Ractor and fork in the same process (at the moment, it's a bug we're trying to fix). I think we could either break the Ractor tests in to a different suite (maybe something like cc @jhawthorn |
d721e37
to
36af661
Compare
@tenderlove I've restored your branch at 433c2d3, and I was definitely having problems because I would really prefer this branch to be rebased cleanly before we merge it, though. Letting CI run again. |
a7dd7b6
to
433c2d3
Compare
Allows users to create / open databases, send queries, and process ResultSets inside a Ractor. However, does not allow passing the gem's domain objects through the Ractor communication channels.
See #299 .