[JAVA-531] Driver allows connection to multiple replica sets without any errors or warnings Created: 07/Mar/12  Updated: 29/Aug/12  Resolved: 24/Jul/12

Status: Closed
Project: Java Driver
Component/s: Cluster Management
Affects Version/s: 2.6.5
Fix Version/s: 2.9.0

Type: Bug Priority: Major - P3
Reporter: Mark Miller Assignee: Steve Briskin (Inactive)
Resolution: Done Votes: 0
Labels: replicaset
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Centos on AWS



 Description   

The driver allows a connection string with a number of hosts, but the hosts can belong to multiple replica sets.
eg. host1,host2,host3,host4,host5,host6 where 1-4 were one replica set (2 being primary) and 5-6 another replica set, with a different name, and 5 being this sets primary.

The situation occurred when we used two nodes to create another replica set, but failed to change the connection string.

No error's were reported by the driver, instead strange application behaviour was experienced as sometimes nodes 5 and 6 were queried, but contained no relevant data.

I know there is a replicaSet option, which I believe causing more checking, but I would think that the default behaviour would be to check that all hosts were in the same replica sets, and to only be able to see one primary.



 Comments   
Comment by Jeffrey Yemin [ 29/Aug/12 ]

Closing as part of 2.9.0 release process.

Comment by auto [ 24/Jul/12 ]

Author:

{u'date': u'2012-07-24T08:21:18-07:00', u'name': u'Steve Briskin', u'email': u'steve.briskin@10gen.com'}

Message: JAVA-531: minor refactoring
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/c0f92ff6f5f251f95677c5e800b83ad987f5879f

Comment by auto [ 24/Jul/12 ]

Author:

{u'date': u'2012-07-23T11:52:09-07:00', u'email': u'steve.briskin@10gen.com', u'name': u'Steve Briskin'}

Message: JAVA-531: throw an exception if Mongo connects to replica sets with different names
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/3b6fc9fb563ed3d0d0abf9ef284bdd9bd91e1089

Comment by Mark Miller [ 07/Mar/12 ]

mongod -version is db version v2.0.0, pdfile version 4.5

Comment by Scott Hernandez (Inactive) [ 07/Mar/12 ]

What server version are you using?

Comment by Jeffrey Yemin [ 07/Mar/12 ]

Do you see any SEVERE logging lines containing the string "mis match set name old:"? That would show that the driver is at least detecting the problem.

But looking at the code, it looks like it won't stop the driver from preceding despite detecting the problem. We should fix this.

Generated at Thu Feb 08 08:52:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.