-
Type: Bug
-
Resolution: Duplicate
-
Priority: Critical - P2
-
None
-
Affects Version/s: 2.4.0-rc1
-
Component/s: Sharding
-
None
-
Environment:2.4.0-rc1 build on Windows 7
-
ALL
-
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\ShardKeyModify.js:54:8
Expect the document to be unchanged
{ "_id" : -1, "ckey" :
, "val" : -1 }
Instead the update goes through resulting in
{ "_id" : -1, "ckey" :
, "val" : -101 }
Similarly the following change should not go through
coll2Sh.update({ckey:{key1:-2, key2:-2}},{$set:{'ckey.key2':-100, val:-100}})
So instead of the document remaining unchanged as
{ "_id" : -2, "ckey" :
, "val" : -2 }
it is updated to
{ "_id" : -2, "ckey" :
, "val" : -100 }
But as expected the following results in an error
coll2Sh.update({ckey:{key1:-3, key2:-3}},{$set:{ckey:
, val:-100}})
Can't modify shard key's value. field: ckey:
collection: _unknown_name_.coll2Sharded
- duplicates
-
SERVER-7379 Immutable shardkey becomes mutable
- Closed