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

collMod fails on the sharded collection if the collection does not exists on all shards

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.0.0
    • Component/s: Sharding
    • None
    • Sharding
    • ALL
    • Hide
      1. sh.enableSharding("test")
      2. db.getSiblingDB("test").ext.insert({})
      3. sh.shardCollection("test.ext", {_id: 1})
      4. db.stats() -> This would show the database / collection to be only on one of the shard (Primary shard for the database). sh.status() would indicate this as well.
      5. db.runCommand({collMod: "ext"}, {keyPattern: {x: 1}, expireAfterSeconds: 100} ) would succeed only on the Primary shard for this database on which the collection exists and will fail on all other shards resulting in error message being returned in the output.
      Show
      sh.enableSharding("test") db.getSiblingDB("test").ext.insert({}) sh.shardCollection("test.ext", {_id: 1}) db.stats() -> This would show the database / collection to be only on one of the shard (Primary shard for the database). sh.status() would indicate this as well. db.runCommand({collMod: "ext"}, {keyPattern: {x: 1}, expireAfterSeconds: 100} ) would succeed only on the Primary shard for this database on which the collection exists and will fail on all other shards resulting in error message being returned in the output.
    • Sharding 10 (02/19/16)

      The collMod on a sharded collection (when it is not yet migrated to all shards) fails with an error message indicating the non-existence of the collections on some of the shards. This is not an expected behavoiur / failure in case of sharded collection that exists just on the Primary shard. The error has been introduced in 3.0.

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            anil.kumar Anil Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: