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

RUBY-1813 Discard ServerSessions involved in network errors #2825

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
lib/mongo/session/server_session/dirtyable.rb Outdated Show resolved Hide resolved
lib/mongo/session/server_session/dirtyable.rb Outdated Show resolved Hide resolved
jamis and others added 2 commits January 15, 2024 06:54
Co-authored-by: Dmitry Rybakov <dmitry.rybakov@mongodb.com>
Co-authored-by: Dmitry Rybakov <dmitry.rybakov@mongodb.com>
@jamis jamis merged commit 9228f5f into mongodb:master Jan 15, 2024
44 of 47 checks passed
@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 <dmitry.rybakov@mongodb.com>

* Another tweak from code review

Co-authored-by: Dmitry Rybakov <dmitry.rybakov@mongodb.com>

---------

Co-authored-by: Dmitry Rybakov <dmitry.rybakov@mongodb.com>
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