-
Notifications
You must be signed in to change notification settings - Fork 531
RUBY-3770 Implement makeTimeoutError semantics in withTransaction #3006
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
Changes from all commits
3166677
8bb216d
680e19e
f29174b
bf72c2f
c7a3ba5
17d2b40
df7c2f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -64,4 +64,120 @@ | |||||
| configureFailPoint: 'failCommand', mode: 'off') | ||||||
| end | ||||||
| end | ||||||
|
|
||||||
| describe 'Connection Pool Backpressure' do | ||||||
| min_server_fcv '8.2' | ||||||
|
||||||
| min_server_fcv '8.2' | |
| min_server_fcv '8.0' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,7 +28,7 @@ | |
|
|
||
| end_stats = get_read_counters | ||
|
|
||
| end_stats[:secondary].should be_within(10).of(start_stats[:secondary]) | ||
| end_stats[:secondary].should be_within(50).of(start_stats[:secondary]) | ||
| end_stats[:primary].should >= start_stats[:primary] + 30 | ||
|
Comment on lines
+31
to
32
|
||
| end | ||
| end | ||
|
|
@@ -50,7 +50,7 @@ | |
|
|
||
| end_stats = get_read_counters | ||
|
|
||
| end_stats[:primary].should be_within(10).of(start_stats[:primary]) | ||
| end_stats[:primary].should be_within(50).of(start_stats[:primary]) | ||
| end_stats[:secondary].should >= start_stats[:secondary] + 30 | ||
|
Comment on lines
+53
to
54
|
||
| end | ||
| end | ||
|
|
||
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.
The helper creates a new TimeoutError but doesn’t explicitly attach the underlying error as the exception cause. In some call sites (e.g., the retry backoff deadline checks) this method is invoked outside of a
rescue, so Ruby won’t auto-populateTimeoutError#cause, and we lose the spec-required ability to surface the underlying error. Consider raising the TimeoutError withcause: last_error(or constructing the exception and passingcause:) so callers can inspect the original failure viaException#cause.