Upsert of a document with shard key results in failure as opposed to a succesful insert

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.4.0-rc1
    • Component/s: Sharding
    • None
    • Environment:
      2.4.0-rc1 2008R2plus build on Windows 7
    • ALL
    • Hide

      Run mongo shardkeyUpsert.js

      Show
      Run mongo shardkeyUpsert.js
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Expect the attach js to result in an insert but it errors out as
      assert: [null] != ["Can't modify shard key's value. field: ukey: -111.0 collecti
      on: _unknown_name_.collSharded"] are not 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.eq (src/mongo/shell/assert.js:32:1)
      at c:\Users\sridhar\Desktop\shardkeyUpsert.js:52:8
      Fri Mar 01 14:23:47.367 JavaScript execution failed: [null] != ["Can't modify sh
      ard key's value. field: ukey: -111.0 collection: _unknown_name_.collSharded"]
      are not equal : undefined at src/mongo/shell/assert.js:L7

        1. shardkeyUpsert.js
          2 kB
          Sridhar Nanjundeswaran

            Assignee:
            Unassigned
            Reporter:
            Sridhar Nanjundeswaran (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: