[SERVER-27526] Get rid of all non-metadata usages of DBConfig::isShardingEnabled Created: 27/Dec/16  Updated: 05/Apr/17  Resolved: 28/Dec/16

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.5.1
Fix Version/s: 3.4.2, 3.5.2

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

Issue Links:
Backports
Depends
is depended on by SERVER-20854 Don't refresh database and collection... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v3.4
Sprint: Sharding 2017-01-02
Participants:

 Description   

The DBConfig::isShardingEnabled function should only be called for metadata commands which want to prevent operations form happening on non-sharding enabled database. The only two such commands are copydb and shardCollection. All other usages should be removed.

Also, the DBConfig::getAllShardedCollections function is only used in the database-wide metadata commands movePrimary and dropDatabase. Since these commands must always run with a fully up-to-date metadata, there is no point in them using the cached collections list so DBConfig::getAllShardedCollections is unnecessary and should be removed.



 Comments   
Comment by Githook User [ 04/Jan/17 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-27526 Remove all non-metadata command usages of DBConfig::isShardingEnabled

(cherry picked from commit efb9ace86bac133fb9f9c17fbb598a45871206ea)
Branch: v3.4
https://github.com/mongodb/mongo/commit/507f0d336f65c8f02b57a8c09d82257e5a54cda0

Comment by Githook User [ 28/Dec/16 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-27526 Remove all non-metadata command usages of DBConfig::isShardingEnabled
Branch: master
https://github.com/mongodb/mongo/commit/efb9ace86bac133fb9f9c17fbb598a45871206ea

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