[SERVER-7612] explicit primary read pref does not work well with shard versioning Created: 10/Nov/12  Updated: 11/Jul/16  Resolved: 12/Nov/12

Status: Closed
Project: Core Server
Component/s: Internal Client, Sharding
Affects Version/s: 2.3.1
Fix Version/s: 2.2.2, 2.3.1

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Randolph Tan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File unshard.js    
Issue Links:
Depends
Duplicate
is duplicated by SERVER-7089 connection churn from mongos to mongod Closed
Related
related to SERVER-6989 mongodump segfaults when host is pass... Closed
related to SERVER-10904 Possible for _master and _slaveConn t... Closed
Operating System: ALL
Participants:

 Description   

The problem here is that when using replica set connections it is possible for mongos to use a different connection when setting the shard version and actually performing the query because of read preference. This means that the actual connection used when performing a query will be completely unversioned, totally bypassing the stale config version checking in the shard.



 Comments   
Comment by auto [ 13/Nov/12 ]

Author:

{u'date': u'2012-11-13T19:23:55Z', u'email': u'randolph@10gen.com', u'name': u'Randolph Tan'}

Message: Removed dead code from SERVER-7612
Branch: v2.2
https://github.com/mongodb/mongo/commit/00b4198bd14793de789b10a322145d7bb6885ff7

Comment by auto [ 13/Nov/12 ]

Author:

{u'date': u'2012-11-13T19:23:55Z', u'email': u'randolph@10gen.com', u'name': u'Randolph Tan'}

Message: Removed dead code from SERVER-7612
Branch: master
https://github.com/mongodb/mongo/commit/32b574388e1296edbe221eff0708fee59563f795

Comment by auto [ 13/Nov/12 ]

Author:

{u'date': u'2012-11-13T04:41:59Z', u'email': u'randolph@10gen.com', u'name': u'Randolph Tan'}

Message: SERVER-7612 explicit primary read pref does not work well with shard versioning

Fixed tests for newly added out parameter.
Branch: v2.2
https://github.com/mongodb/mongo/commit/ef576759d86050a6098d201cdb193112f1062c94

Comment by auto [ 13/Nov/12 ]

Author:

{u'date': u'2012-11-12T19:07:44Z', u'email': u'randolph@10gen.com', u'name': u'Randolph Tan'}

Message: SERVER-7612 explicit primary read pref does not work well with shard versioning

Ensure that selectNodeUsingTags will use the same connection to the primary with checkMaster
Branch: v2.2
https://github.com/mongodb/mongo/commit/3d3f7e28b06d42b3f7432d834ac7056e53c41c88

Comment by auto [ 13/Nov/12 ]

Author:

{u'date': u'2012-11-13T04:41:59Z', u'email': u'randolph@10gen.com', u'name': u'Randolph Tan'}

Message: SERVER-7612 explicit primary read pref does not work well with shard versioning

Fixed tests for newly added out parameter.
Branch: master
https://github.com/mongodb/mongo/commit/5b5690339ed066bfc8025dd1fa60d4e3c75f538d

Comment by auto [ 12/Nov/12 ]

Author:

{u'date': u'2012-11-12T19:07:44Z', u'email': u'randolph@10gen.com', u'name': u'Randolph Tan'}

Message: SERVER-7612 explicit primary read pref does not work well with shard versioning

Ensure that selectNodeUsingTags will use the same connection to the primary with checkMaster
Branch: master
https://github.com/mongodb/mongo/commit/53ffd6d8e442a8d09569845e02e9dee528950481

Comment by Randolph Tan [ 10/Nov/12 ]

attached test file - unshard.js

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