aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/log_subscriber_test.rb
diff options
context:
space:
mode:
authorEugene Kenny <elkenny@gmail.com>2018-05-13 02:02:37 +0100
committerEugene Kenny <elkenny@gmail.com>2018-05-13 02:02:37 +0100
commit48007d5390db47fc1223f57c8e7ab3ebb7c3a3d7 (patch)
tree4a8560807a0c46336001db207c96e01e27c5974d /activesupport/test/log_subscriber_test.rb
parent6fac9bd599eeb6b9cacdf7841811223402c501bd (diff)
downloadrails-48007d5390db47fc1223f57c8e7ab3ebb7c3a3d7.tar.gz
rails-48007d5390db47fc1223f57c8e7ab3ebb7c3a3d7.tar.bz2
rails-48007d5390db47fc1223f57c8e7ab3ebb7c3a3d7.zip
Remove ActiveRecord::Transactions#rollback_active_record_state!
`rollback_active_record_state!` was removed from `save!` but not `save` in da840d13da865331297d5287391231b1ed39721b. I believe that leaving it in `save` was a mistake, since that commit was intended to move the rollback logic from the `save`/`save!` call to the transaction stack. As of 67d8bb963d5d51fc644d6b1ca20164efb4cee6d7 the record's original state is lazily restored the first time it's accessed after the transaction, instead of when a rollback occurs. This means that the call to `restore_transaction_record_state` here has no effect: the record's transaction level is incremented twice (in rollback_active_record_state! and `with_transaction_returning_status`), isn't decremented again until the the `ensure` block runs, and won't hit zero until the next time `sync_with_transaction_state` is called.
Diffstat (limited to 'activesupport/test/log_subscriber_test.rb')
0 files changed, 0 insertions, 0 deletions