Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # 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
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>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants