diff --git a/reference/mongo/connecting.xml b/reference/mongo/connecting.xml index e28644b2db..1474d86529 100644 --- a/reference/mongo/connecting.xml +++ b/reference/mongo/connecting.xml @@ -100,6 +100,16 @@ $m = new MongoClient("mongodb://rs1.example.com:27017,rs2.example.com:27017", ar server from each of your datacenters. + + + The host names that you specify here must match the + names as given in the replica set configuration because the driver uses the + name as specified in the replica set configuration as identifier in its + internal mapping. Specifying (for example) the IP address instead of the + configured host name makes that the driver keeps a connection for both the + host name and its accompanying IP address. + + If the primary becomes unavailable, an election will take place and a secondary will be promoted to the role of primary (unless a majority vote diff --git a/reference/mongo/mongoclient.xml b/reference/mongo/mongoclient.xml index 1c724f3e14..fad8240862 100644 --- a/reference/mongo/mongoclient.xml +++ b/reference/mongo/mongoclient.xml @@ -11,7 +11,7 @@
&reftitle.intro; - A connection between PHP and MongoDB. + A connection manager for PHP and MongoDB. This class is used to create and manage connections. A typical use is: @@ -145,8 +145,8 @@ $db = $m->foo; // get the database named "foo" MongoClient::VERSION - PHP driver version. May be suffixed with "+" or "-" if it is in-between - versions. + PHP driver version. May be suffixed with "dev", "+" or "-" if it is + in-between versions. diff --git a/reference/mongo/mongoclient/construct.xml b/reference/mongo/mongoclient/construct.xml index 262eb533ab..7303183c93 100644 --- a/reference/mongo/mongoclient/construct.xml +++ b/reference/mongo/mongoclient/construct.xml @@ -39,10 +39,12 @@ mongodb://[username:password@]host1[:port1][,host2[:port2:],...]/db At least one host must be given (port optional, always defaulting to 27017) - and as many hosts as desired may be connected to. Host names are + and as many hosts as desired may be connected to. Host names are comma-separated and the constructor will return successfully if it connected to at least one host. If it could not connect to any of the hosts, it will - throw a MongoConnectionException. + throw a MongoConnectionException. Please see the + Replica Sets section for + information on how to connect to Replica Sets. If you specified a username and password, you may specify a database to