@@ -1260,6 +1260,39 @@ using the Ruby driver directly. `Mongoid documentation
1260
1260
however provides examples for closing clients in the parent process and
1261
1261
reconnecting clients in the child processes.
1262
1262
1263
+ Troubleshooting
1264
+ ```````````````
1265
+
1266
+ The client's ``summary`` method returns the current state of the client,
1267
+ including servers that the client is monitoring and their state. If any of
1268
+ the servers are not being monitored, this is indicated by the ``NO-MONITORING``
1269
+ flag.
1270
+
1271
+ A normally operating client will produce a summary similar to the following:
1272
+
1273
+ .. code-block:: ruby
1274
+
1275
+ client.summary
1276
+ => "#<Client cluster=#<Cluster
1277
+ topology=ReplicaSetWithPrimary[localhost:14420,localhost:14421,localhost:14422,localhost:14423,name=ruby-driver-rs,v=1,e=7fffffff000000000000001f]
1278
+ servers=[#<Server address=localhost:14420 PRIMARY replica_set=ruby-driver-rs pool=#<ConnectionPool size=0 (0-5) used=0 avail=0 pending=0>>,
1279
+ #<Server address=localhost:14421 SECONDARY replica_set=ruby-driver-rs pool=#<ConnectionPool size=0 (0-5) used=0 avail=0 pending=0>>,
1280
+ #<Server address=localhost:14422 SECONDARY replica_set=ruby-driver-rs pool=#<ConnectionPool size=0 (0-5) used=0 avail=0 pending=0>>,
1281
+ #<Server address=localhost:14423 ARBITER replica_set=ruby-driver-rs>]>>"
1282
+
1283
+ A client that is missing background threads will produce a summary similar to
1284
+ the following:
1285
+
1286
+ .. code-block:: ruby
1287
+
1288
+ client.summary
1289
+ => "#<Client cluster=#<Cluster
1290
+ topology=ReplicaSetWithPrimary[localhost:14420,localhost:14421,localhost:14422,localhost:14423,name=ruby-driver-rs,v=1,e=7fffffff000000000000001f]
1291
+ servers=[#<Server address=localhost:14420 PRIMARY replica_set=ruby-driver-rs NO-MONITORING pool=#<ConnectionPool size=0 (0-5) used=0 avail=0 pending=0>>,
1292
+ #<Server address=localhost:14421 SECONDARY replica_set=ruby-driver-rs NO-MONITORING pool=#<ConnectionPool size=0 (0-5) used=0 avail=0 pending=0>>,
1293
+ #<Server address=localhost:14422 SECONDARY replica_set=ruby-driver-rs NO-MONITORING pool=#<ConnectionPool size=0 (0-5) used=0 avail=0 pending=0>>,
1294
+ #<Server address=localhost:14423 ARBITER replica_set=ruby-driver-rs>]>>"
1295
+
1263
1296
1264
1297
Details on Retryable Reads
1265
1298
==========================
0 commit comments