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

RUST-935 direct retries to different mongos #968

Merged
merged 9 commits into from
Oct 6, 2023

Conversation

abr-egn
Copy link
Contributor

@abr-egn abr-egn commented Sep 28, 2023

RUST-935

I opted to introduce the SelectionRetry wrapper so that the actual details of what it is and how it's used only need to be known within attempt_to_select_server - callers just need to preserve it and pass it back in. I did consider making this part of SelectionCriteria, but that would have been a pretty major refactoring since that would have to move from the current enum to a struct with a "kind" enum.

@abr-egn abr-egn marked this pull request as ready for review September 28, 2023 16:53
@isabelatkinson
Copy link
Contributor

I opted to introduce the SelectionRetry wrapper so that the actual details of what it is and how it's used only need to be known within attempt_to_select_server

just personal preference, but I think the indirection here makes it a little less clear what's going on in the executor; I would probably prefer including the field directly or naming the wrapper something a bit more specific, but up to you 🙂

looks like there are also some prose tests that need to be implemented as part of this ticket: mongodb/specifications@86d961f

@abr-egn
Copy link
Contributor Author

abr-egn commented Oct 4, 2023

just personal preference, but I think the indirection here makes it a little less clear what's going on in the executor; I would probably prefer including the field directly or naming the wrapper something a bit more specific, but up to you 🙂

Yeah, good call. I've got a bee in my bonnet about trying to keep reasoning as local as possible, but that didn't work out here. Updating this also brought it more in line with the way the spec describes the logic, which should help future maintainability.

looks like there are also some prose tests that need to be implemented as part of this ticket: mongodb/specifications@86d961f

Derp. Added.

@abr-egn abr-egn merged commit 9ee4f6a into mongodb:main Oct 6, 2023
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