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

Able to unset embedded parts of the shard key -- changing it

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: 2.4.0-rc1
    • Component/s: Sharding
    • None
    • Environment:
      2.4.0-rc1 build on Windows 7
    • ALL
    • Hide

      mongo ShardKeyUnset.js

      Show
      mongo ShardKeyUnset.js

      The test below fails with
      assert: [null] != [null] are equal : undefined
      Error: Printing Stack Trace
      at printStackTrace (src/mongo/shell/utils.js:37:7)
      at doassert (src/mongo/shell/assert.js:6:1)
      at Function.assert.neq (src/mongo/shell/assert.js:44:1)
      at c:\Users\sridhar\Desktop\ShardKeyUnset.js:39:8

      Expect the document to be unchanged
      { "_id" : -1, "ckey" :

      { "key1" : -1, "key2" : -1 }

      , "val" : -1 }
      Instead the update goes through resulting in
      { "_id" : -1, "ckey" : { }, "val" : -100 }

        1. ShardKeyUnset.js
          1 kB
          Sridhar Nanjundeswaran

            Assignee:
            Unassigned Unassigned
            Reporter:
            sridhar Sridhar Nanjundeswaran
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: