Skip to content
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

Aborting transactions in killed threads #752

Merged
merged 2 commits into from
Jan 9, 2014

Conversation

chanks
Copy link
Contributor

@chanks chanks commented Jan 9, 2014

Hi Jeremy -

So, it turned out that the unfortunate issue where the status of a killed thread was "run" was introduced in Ruby 1.9 but fixed in Ruby 2.0. This means that on Ruby 2.0, 2.1, and recent versions of Rubinius we can use the safer 1.8 behavior of executing a rollback if the current thread's status is "aborting". The specs pass on every version of Ruby on my system:

rvm rubies

   jruby-1.7.5 [ x86_64 ]
   rbx-2.1.1 [ x86_64 ]
   rbx-2.2.1 [ x86_64 ]
   rbx-2.2.3 [ x86_64 ]
   ruby-1.8.7-p374 [ x86_64 ]
   ruby-1.9.3-p484 [ x86_64 ]
 * ruby-2.0.0-p247 [ x86_64 ]
=> ruby-2.1.0 [ x86_64 ]

I couldn't find the list of Rubies you test Sequel on - are there any others I should run?

Thanks!

@jeremyevans
Copy link
Owner

Thanks for the patch! This looks good to me, so as long as it passes the test suite, it will go in.

I currently test Sequel on ruby 1.8.7, 1.9.2, 1.9.3, 2.0.0, 2.1.0, jruby 1.7, and rbx 2.2, so you appear to have everything covered.

@jeremyevans jeremyevans merged commit 5d09d72 into jeremyevans:master Jan 9, 2014
@chanks chanks deleted the transaction-aborting branch January 9, 2014 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants