-
Notifications
You must be signed in to change notification settings - Fork 533
[RUBY-3496] Fix legacy read pool retry error #2878
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
Merged
comandeo-mongo
merged 6 commits into
mongodb:master
from
joelim41:fix-legacy-read-pool-retry-error
Jul 4, 2024
Merged
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
8aa048d
Fix legacy read pool retry error
joelim41 29d9503
specify max_read_retries in test
joelim41 7cba1c3
Update lib/mongo/retryable/base_worker.rb
joelim41 d84f346
add PoolPausedError as retryable
joelim41 a575a12
Better distinguish legacy and modern retries
comandeo-mongo 06c573d
Merge remote-tracking branch 'upstream/master' into fix-legacy-read-p…
comandeo-mongo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
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.
According to the specification only the
PoolClearedError
should be retried, not all pool errors. So, havingPoolError
here seems to be too broad.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.
@comandeo-mongo
Error::ServerNotUsable
andError::ConnectionPerished
are listed here as retryable but not in the specification, could you clarify if they are retryable? Asking because we started seeing these errors after upgrading to the latest.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.
@comandeo-mongo I've addressed your comment, please look at it when you have the time.
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.
Hi @joelim41 , I am finally looking into it, sorry for the delay. Meanwhile, I would like to clarify - did you start seeing
Error::ServerNotUsable
andError::ConnectionPerished
only after the upgrade? It might be an indication of some other issues.Uh oh!
There was an error while loading. Please reload this page.
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.
@joelim41 one more "side" question - is there something preventing you from using modern retries? Legacy retry mechanism is deprecates since
2.9.0
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.
@comandeo-mongo this happened after we upgraded from
v2.16.0
tov2.20.0
, when we experienced some scaling issues in one of our mongoS clusters. I seeError::ServerNotUsable
was only introduced inv2.19.0
andError::ConnectionPerished
was made retryable also inv2.19.0
here.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.
We just started exploring what it takes to move to modern retries
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.
Oh, I missed that you are upgrading from 2.16. So yes, you weren't able to see those errors. I think it is OK if you see them when a mongos has issues.
As to this PR - I think we should separate the list of the retryable errors for modern and legacy retries.
PoolError
has a special treatment in modern retries, so I would like to avoid just adding it toretryable_exceptions
. I'll make a commit to your PR with the proposed solution.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.
Got it, thank you!