Details
-
Bug
-
Resolution: Done
-
Major - P3
-
2.2.1, 2.4.1
-
None
-
ALL
Description
$ mongo localhost:31200
|
MongoDB shell version: 2.5.0-pre-
|
connecting to: localhost:31200/test
|
Server has startup warnings:
|
Wed Apr 10 18:43:07.479 [initandlisten]
|
Wed Apr 10 18:43:07.479 [initandlisten] ** NOTE: This is a development version (2.5.0-pre-) of MongoDB.
|
Wed Apr 10 18:43:07.479 [initandlisten] ** Not recommended for production.
|
Wed Apr 10 18:43:07.479 [initandlisten]
|
anden(mongod-2.5.0-pre-)[PRIMARY/SHARDING-rs1] test> rs.config()
|
{
|
"_id": "SHARDING-rs1",
|
"version": 4,
|
"members": [
|
{
|
"_id": 0,
|
"host": "anden.local:31200",
|
"tags": {
|
"dc": "ny",
|
"server": "0"
|
}
|
},
|
{
|
"_id": 1,
|
"host": "anden.local:31201",
|
"tags": {
|
"dc": "hobo",
|
"server": "1",
|
"theOtherShard": "doesntHaveThisTag"
|
}
|
},
|
{
|
"_id": 2,
|
"host": "anden.local:31202",
|
"priority": 0,
|
"tags": {
|
"dc": "sf",
|
"server": "2"
|
}
|
}
|
],
|
"settings": {
|
"getLastErrorModes": {
|
"ALL": {
|
"server": 3
|
},
|
"AllDC": {
|
"dc": 2
|
},
|
"AnyDC": {
|
"dc": 1
|
},
|
"Broken": {
|
"theOtherShard": 1
|
}
|
}
|
}
|
}
|
anden(mongod-2.5.0-pre-)[PRIMARY/SHARDING-rs1] test> db.test.insert({foo: "bar"})
|
Inserted 1 record(s) in 1ms
|
anden(mongod-2.5.0-pre-)[PRIMARY/SHARDING-rs1] test> db.runCommand({getLastError:1,w:"AllDC",wtimeout: 1000});
|
{
|
"n": 0,
|
"lastOp": Timestamp(1365655128, 1),
|
"connectionId": 417,
|
"wtimeout": true,
|
"waited": 1000,
|
"writtenTo": [
|
{
|
"_id": 0,
|
"host": "anden.local:31200",
|
"tags": {
|
"dc": "ny",
|
"server": "0"
|
}
|
},
|
{
|
"_id": 1,
|
"host": "anden.local:31201",
|
"tags": {
|
"dc": "hobo",
|
"server": "1",
|
"theOtherShard": "doesntHaveThisTag"
|
}
|
},
|
{
|
"_id": 2,
|
"host": "anden.local:31202",
|
"priority": 0,
|
"tags": {
|
"dc": "sf",
|
"server": "2"
|
}
|
}
|
],
|
"err": "timeout",
|
"ok": 1
|
}
|
anden(mongod-2.5.0-pre-)[PRIMARY/SHARDING-rs1] test>
|
Note that using the "AnyDC" tag works fine.