Skip to content

RUBY-3284 Enable max_connecting client option #2739

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 15 commits into from
Jul 13, 2023

Conversation

comandeo
Copy link

@comandeo comandeo commented Jul 7, 2023

No description provided.

@comandeo comandeo marked this pull request as ready for review July 7, 2023 15:36
@comandeo comandeo requested a review from jamis July 7, 2023 15:36
Copy link
Contributor

@jamis jamis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question, and a copy/paste artifact. Otherwise, looks great!

@@ -36,6 +36,10 @@ class ConnectionPool
# @since 2.9.0
DEFAULT_MIN_SIZE = 0.freeze

# The default maximum number of connections that can be connecting at
# any given time.
DEFAULT_MAX_CONNECTING = 2.freeze
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Freezing an immutable constant doesn't really do anything, does it? My understanding is that the primary purpose of freezing constants is to prevent them from being modified in place. Is there another reason for freezing numbers (which are already immutable)?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, thank you. Fixed.

let(:max_connecting) { 10 }
let(:options) { "maxConnecting=#{max_connecting}" }

it 'sets the max pool size option' do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this read 'sets the max connecting option'?

# This option should be increased if there are many threads that share
# the same client and the application is experiencing timeouts
# while waiting for connections to be established.
# selecting a server for an operation. The default is 100.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"... The default is 100"

Is that a copy/paste artifact?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is indeed, good catch! Thank you, fixed.

# Exception that is raised when trying to create a client with an invalid
# max_connecting option.
#
# @since 2.4.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be 2.19.0 (not 2.4.2)?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a copy/paste artifact, too. We do not use @SInCE tag at all now. Removed, thank you.

@comandeo comandeo merged commit 7f338a1 into mongodb:master Jul 13, 2023
@comandeo comandeo deleted the 3284-check-out-timeout branch July 13, 2023 14:13
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.

4 participants