[SERVER-49009] SetShardVersion must not call forceShardFilteringMetadataRefresh Created: 22/Jun/20  Updated: 29/Oct/23  Resolved: 27/Jun/20

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

Type: Bug Priority: Major - P3
Reporter: Marcos José Grillo Ramirez Assignee: Pierlauro Sciarelli
Resolution: Fixed Votes: 0
Labels: PM-1645-Milestone-1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2020-06-29
Participants:
Linked BF Score: 26

 Description   

On SERVER-48883 an invariant was added into the migration recovery to detect if any other operation could race while refreshing the shard version.

The following incorrect behavior has been found: with mongos version 4.4 and shards mongod version master, a stale shard version error triggers a set shard version request on the shard's primary forcing a forceShardFilteringMetadataRefresh.

A solution can be calling onShardVersionMismatch in order to wait for an eventual recovery/refresh.

Not happening with mongos master because the version manager has been deleted in SERVER-47426 (commit).



 Comments   
Comment by Githook User [ 27/Jun/20 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-49009 SetShardVersion must not call forceShardFilteringMetadataRefresh
Branch: master
https://github.com/mongodb/mongo/commit/e2aa2d700f7463e4b9097f7707dbe9ccfee44a00

Comment by Kaloian Manassiev [ 23/Jun/20 ]

For Step 3 - how does the index creation operation manage to refresh the shardVersion, given that it should be joining the recovery? By this logic nothing would work, like Esha mentions above. I didn't find a direct call to forceShardFilteringMetadata refresh on the index build code path either.

Comment by Esha Maharishi (Inactive) [ 22/Jun/20 ]

Note that any versioned request can cause this race, not just createIndexes

Generated at Thu Feb 08 05:18:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.