Skip to content

Commit 28d9743

Browse files
p-mongop
authored andcommitted
Improve diagnostics provided by the driver (partial backport of #1472)
* Make connection pool check out failure exception more informative * Distinguish monitoring connections from operation ones * Increase default connection checkout timeout to 10 seconds * Add connection pool summary for diagnostics
1 parent 1c84eee commit 28d9743

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/mongo/server/monitor/connection.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def handshake!(socket)
235235
end
236236

237237
def retry_message
238-
"Retrying ismaster on #{address}"
238+
"Retrying ismaster in monitor for #{address}"
239239
end
240240
end
241241
end

spec/mongo/server/monitor/connection_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155

156156
it 'logs the retry' do
157157
expect(Mongo::Logger.logger).to receive(:warn) do |msg|
158-
expect(msg).to match(/Retrying ismaster on #{connection.address}/)
158+
expect(msg).to match(/Retrying ismaster in monitor for #{connection.address}/)
159159
end
160160
expect(result).to be_a(Hash)
161161
end

0 commit comments

Comments
 (0)