Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-27526

Get rid of all non-metadata usages of DBConfig::isShardingEnabled

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.5.1
    • Fix Version/s: 3.4.2, 3.5.2
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v3.4
    • Sprint:
      Sharding 2017-01-02

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: