[SERVER-22203] remove shardVersion information and usages from BatchedCommandRequest Created: 15/Jan/16  Updated: 16/Mar/16  Resolved: 08/Mar/16

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.3.3

Type: Task Priority: Major - P3
Reporter: Eric Milkie Assignee: Esha Maharishi (Inactive)
Resolution: Done Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-22771 multiUpdate and multiRemove ops from ... Closed
is related to SERVER-20361 Improve the behaviour of multi-update... Backlog
Backwards Compatibility: Fully Compatible
Sprint: Sharding F (01/29/16), Sharding 10 (02/19/16), Sharding 11 (03/11/16)
Participants:

 Description   

    // If the request has a shard version, but the operation doesn't have a shard version, this
    // means it came from an old mongos instance (pre 3.2) that set the version in the "metadata"
    // field instead of at the top level. Set the value in order to ensure the
    // dependent code works.
    // TODO(spencer): Remove this after 3.2 ships.



 Comments   
Comment by Esha Maharishi (Inactive) [ 08/Mar/16 ]

Note: a change was made to when mongod does shard versioning to allow idempotent multiUpdates to eventually succeed if retried until all matching documents were updated.

Before: If a stale mongos targeted a single shard for a multiUpdate or multiRemove, but the chunk had moved, the update or remove would never succeed from that mongos (unless/until the mongos refreshed its metadata due to some other operation).

After: The above case now succeeds, since versioning is done if a single shard is targeted. On the other hand, if a stale mongos targets multiple shards, but a chunk has moved, the mongos will receive a staleShardVersion and retry the request to (all) shards, allowing the request to eventually succeed. However, in this case, a non-idempotent update may get applied more than once.

Comment by Githook User [ 08/Mar/16 ]

Author:

{u'name': u'Esha Maharishi', u'email': u'esha.maharishi@mongodb.com'}

Message: SERVER-22203 consolidate shardVersion checks to using the OperationShardVersion.
Branch: master
https://github.com/mongodb/mongo/commit/a9bac8cdf15d4b7a8bf6cfd9e9b3e9b7795d4436

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