After upgrading to 2.4.0, updates stopped working. All of my updates are upserts, and they fail with the message "cannot modify shard key for collection tripquest.persistentlistings, found new value for q.md", both through the Perl MongoDB module and in the mongo shell.
I've checked and double-checked, and the shard key is not being modified. It even happens when there is NO existing document. A straight insert does work.
It also works if I run a 2.2.3 mongos and connect to the same configdb, with the same mongod's (all 2.4) behind it. With a 2.4.0 mongos, it doesn't work.
Also, it complains that it found a new value for the first entry in "q". If I put "de" first, it complains that "de" is the new value. Likewise for "gw".
The shard key is a composite:
{ "q.de" : 1, "q.gw" : 1, "q.md" : 1 }- is duplicated by
-
SERVER-8384 Using $set with upsert against sharded cluster behaves differently to non-sharded cluster
- Closed
- related to
-
SERVER-7379 Immutable shardkey becomes mutable
- Closed
-
SERVER-6835 Sharding edge case upserts documents with multiple _id attributes
- Closed