[SERVER-45782] Remove usages of getCurrentShardVersionIfKnown and most of getCurrentMetadataIfKnown Created: 27/Jan/20  Updated: 29/Oct/23  Resolved: 10/Apr/20

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

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

Issue Links:
Gantt Dependency
has to be done after SERVER-45781 Throw Stale Shard Version when collec... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2020-03-09, Sharding 2020-03-23, Sharding 2020-04-06, Sharding 2020-04-20
Participants:

 Description   

Most usages of getCurrentMetadataIfKnown are actually meant to be getCollectionDescription or getOwnershipFilter except for a few cases. Investigate and change where appropiate and make sure the return type of getCurrentMetadataIfKnown is properly managed.



 Comments   
Comment by Githook User [ 09/Apr/20 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-45782 ensure internal-only usage of three CollectionShardingRuntime functions

  • setFilteringMetadata
  • getCurrentMetadataIfKnown
  • getShardVersionIfKnown

Have been moved from CSS to CSR to ensure no external usages.

Moreover the getShardVersion command is now foribidden on unsharded
mongod. It will return ErrorCodes.NoShardingEnabled in such a
case.
Branch: master
https://github.com/mongodb/mongo/commit/6328c0782c55a5c73a1c1d96a3845eda98dfcd2d

Comment by Marcos José Grillo Ramirez [ 03/Mar/20 ]

Stopped momentarily to finish https://jira.mongodb.org/browse/SERVER-45781 first

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