[SERVER-20285] Unify the formats used by the find and write commands for specifying shard version metadata Created: 03/Sep/15  Updated: 25/Jan/17  Resolved: 17/Sep/15

Status: Closed
Project: Core Server
Component/s: Sharding, Write Ops
Affects Version/s: None
Fix Version/s: 3.1.9

Type: Task Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-19855 Operations that convey shard version ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 9 (09/18/15)
Participants:

 Description   

find command sets shardVersion as a top-level field, and the Command running framework parses it out and sets it on the operation context.
Write commands, on the other hand, set shardVersion nested in a "metadata" field and are responsible for extracting the version themselves.

We should unify these.



 Comments   
Comment by Githook User [ 17/Sep/15 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-19855 SERVER-20285 Make write commands send shard version information at the top level
Branch: master
https://github.com/mongodb/mongo/commit/e44bf3dc351624ff26968a8006dfa385ffc83516

Comment by Kaloian Manassiev [ 14/Sep/15 ]

This is correct - the changes that we are doing as part of the read-after-optime work had the intention of introducing a common format which to use for exchanging shard version information and namespace. This ticket is here just for tracking that work, which although on the way of getting to the exchanging of latest optime, do not fully implement it.

Comment by Spencer Brody (Inactive) [ 03/Sep/15 ]

We may also want to consider changing both to take the version from the OP_COMMAND metadata section.

Comment by Spencer Brody (Inactive) [ 03/Sep/15 ]

If we decide to adopt the write command format (inside a nested "metadata" field), that's easy, we just change dbcommand to parse it out in that format.

If we decide to adopt the find command format we can do it by changing the write commands on mongod to only override the operation shard version if it isn't already set, then after 3.2 we can remove the parsing of the version from the "metadata" field from the write commands entirely.

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