|
Fixed by commits related to SERVER-11611.
|
|
eliot, I see you just pushed some commits related to this for SERVER-11611. That does seem to fix the problem:
2013-11-07T17:59:19.784-0800 [initandlisten] db version v2.5.4-pre-
2013-11-07T17:59:19.784-0800 [initandlisten] git version: cf0103d736d93d14f1b3eaa7fe3e97a2c77a8080
> db.dropDatabase()
|
{ "dropped" : "foo", "ok" : 1 }
|
> db.runCommand({update: 'bar', updates: [{q: {_id: 1}, u: {}, upsert: true}]})
|
{ "ok" : 1, "n" : 1, "upserted" : 1 }
|
> db.bar.find()
|
{ "_id" : 1 }
|
> db.bar.getIndexes()
|
[
|
{
|
"v" : 1,
|
"key" : {
|
"_id" : 1
|
},
|
"name" : "_id_",
|
"ns" : "foo.bar"
|
}
|
]
|
> db.bar.insert({_id: 1})
|
E11000 duplicate key error index: foo.bar.$_id_ dup key: { : 1.0 }
|
|
|
2013-11-07T17:39:46.396-0800 [initandlisten] db version v2.5.4-pre-
2013-11-07T17:39:46.396-0800 [initandlisten] git version: 75fdb3e7312adcf187985a90e3c6f3700be1c20e
Pulled this morning. I'll pull, rebuild, and try again.
|
|
What hash? There was a bug in some heads.
Try with the latest.
|
|
schwerin, that would appear to be the problem. The _id_ index isn't being created. I've updated the subject.
> db.dropDatabase()
|
{ "dropped" : "foo", "ok" : 1 }
|
> db.runCommand({update: 'bar', updates: [{q: {_id: 1}, u: {}, upsert: true}]})
|
{ "ok" : 1, "n" : 1, "upserted" : 1 }
|
> db.bar.getIndexes()
|
[ ]
|
|
|
Is there an index on _id? Looks like that's the likely culprit.
|
Generated at Thu Feb 08 03:26:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.