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

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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.4.0-rc1
    • Sharding
    • None
    • 2.4.0-rc1 2008R2plus build on Windows 7
    • ALL
    • Hide

      Run mongo shardkeyUpsert.js

      Show
      Run mongo shardkeyUpsert.js

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            sridhar Sridhar Nanjundeswaran
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: