Skip to content

RUBY-1813 Discard ServerSessions involved in network errors #2825

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
merged 4 commits into from
Jan 15, 2024

Conversation

jamis
Copy link
Contributor

@jamis jamis commented Jan 12, 2024

Add a dirty flag to ServerSession, and set it when a network error occurs. When checking the session back into the session pool, discard the session if it was marked dirty.

ref: RUBY-1813, DRIVERS-649, also RUBY-3000, RUBY-3031

@jamis jamis requested a review from comandeo January 12, 2024 21:14
jamis and others added 2 commits January 15, 2024 06:54
Co-authored-by: Dmitry Rybakov <[email protected]>
Co-authored-by: Dmitry Rybakov <[email protected]>
@jamis jamis merged commit 9228f5f into mongodb:master Jan 15, 2024
@jamis jamis deleted the 1813-discard-dirty-server-sessions branch January 15, 2024 13:56
comandeo pushed a commit to comandeo/mongo-ruby-driver that referenced this pull request Jan 24, 2024
…2825)

* RUBY-1813 Discard ServerSessions involved in network errors

* no need to test the now-non-existant SessionPool.create method

* Tweak from code review

Co-authored-by: Dmitry Rybakov <[email protected]>

* Another tweak from code review

Co-authored-by: Dmitry Rybakov <[email protected]>

---------

Co-authored-by: Dmitry Rybakov <[email protected]>
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