Open
Conversation
1ae38e6 to
07b512c
Compare
In ActiveRecord 8.1+, replica connections cannot execute lock queries, so it raises ActiveRecord::ReadOnlyError instead of ActiveRecord::Deadlocked.
07b512c to
72fd341
Compare
ohbarye
commented
Dec 19, 2025
| }.to raise_error(ActiveRecord::Deadlocked) | ||
| expect(log.string).to include("Failed to execute") | ||
| # In ActiveRecord 8.1+, replica connections cannot execute lock queries, | ||
| # so it raises ActiveRecord::ReadOnlyError instead of ActiveRecord::Deadlocked. |
Contributor
Author
There was a problem hiding this comment.
I understand why this test fails since 8.1.,0 but I'm not sure how this test should be. Although the current approach passes tests, it looks like a workaround.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
This adds activerecord 8.1 into the test matrix since activerecord 8.1 was released on October 22, 2025.
ref: https://rubygems.org/gems/activerecord/versions/8.1.0
8.1 still requires Ruby 3.2 or later as like 8.0 does.
Testing
Some tests fail on 8.1. I'll check it later.
https://github.com/ohbarye/activerecord-debug_errors/actions/runs/19865227719/job/56925996094