[SERVER-28814] Eliminate ServerSelectionMetadata in favor of just using ReadPreferenceSetting Created: 14/Apr/17  Updated: 06/Aug/18  Resolved: 12/May/17

Status: Closed
Project: Core Server
Component/s: Networking, Sharding
Affects Version/s: None
Fix Version/s: 3.5.7

Type: Task Priority: Major - P3
Reporter: Mathias Stearn Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-28816 Mongos ingress networking layer able ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Repl 2017-05-08, Repl 2017-05-29
Participants:
Linked BF Score: 0

 Description   

ServerSelectionMetadata is just a ReadPreferenceSetting + secondaryOk. Since secondaryOk is equivalent to ReadPreference SecondaryPreferred, it is simpler to translate it so we have a single source of truth. This is part of the OP_MSG spec which specifies using $readPreference rather than $ssm. The $ssm metadata field will still be used when communicating with 3.4 nodes over OP_COMMAND, but it will be translated at the border.

As part of this work, ReadPreferenceSetting will be attached to the OperationContext on mongos in the same way that it is in mongod.



 Comments   
Comment by Githook User [ 12/May/17 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-28814 Add missing libdep
Branch: master
https://github.com/mongodb/mongo/commit/b4ec2f3fb21bbcb528a28b4633120f733b1d8976

Comment by Githook User [ 12/May/17 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-28814 Replace ServerSelectionMetadata with just ReadPreferenceSetting
Branch: master
https://github.com/mongodb/mongo/commit/f2902d59175c0724944ca98d13f784e2de944053

Comment by Githook User [ 12/May/17 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-28814 eliminate unnecessary includes of server_selection_metadata.h
Branch: master
https://github.com/mongodb/mongo/commit/1a955fc356627b8cc74eb15506608dd987184608

Comment by Githook User [ 12/May/17 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-28814 Stop returning Status from metadata functions

Every caller was already using uassertStatusOK. Moving that into the
functions simplifies both the implementation and the callers. Also eliminated
functions without any callers.
Branch: master
https://github.com/mongodb/mongo/commit/efbf9972043c91531ce3d43275cdb8d3beb08dc2

Comment by Githook User [ 12/May/17 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-28814 Don't try to upconvert commands with invalid $maxTimeMS field
Branch: master
https://github.com/mongodb/mongo/commit/bffbfc21151a8544c9faf9fc2bf97169cbe0bc36

Comment by Githook User [ 12/May/17 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-28814 Attach ServerSelectionMetadata to OpCtx in mongos

This eliminates the need to pass it in to Command::explain()
Branch: master
https://github.com/mongodb/mongo/commit/486759fee5852abed5ee263583d6e867da9c0f5d

Comment by Githook User [ 12/May/17 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-28814 Clean up ClusterExplain::wrapAsExplain()
Branch: master
https://github.com/mongodb/mongo/commit/cb3e9d87a1150fcfd90b7db3e289e298c5c70bff

Comment by Githook User [ 12/May/17 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-28814 Add and use ReadPreferenceSetting::secondaryPreferredMetadata()

This is prep for eliminating ServerSelectionMetadata in favor of just
ReadPreferenceSetting.
Branch: master
https://github.com/mongodb/mongo/commit/f9b8a9eb2d196d93a08714c9bbcecbb7fe30a5f3

Generated at Thu Feb 08 04:19:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.