-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.4.6
-
Component/s: Index Maintenance
-
None
-
Environment:Ubuntu 12.04.x LTS
3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:33:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
-
ALL
-
We want to creat a compound index in a sharded collection with a hashed sharding key.
The non hashed shard key is a prefix of the compound index.
If we create the index before we shard the collection, mongodb does not complain about the index.
{ "err" : "can't use unique indexes with sharding ns:test.collection key: { targetId: 1.0, timestamp: -1.0 }", "code" : 10205, "n" : 0, "ok" : 1 }