-
Type: Bug
-
Resolution: Duplicate
-
Priority: Blocker - P1
-
None
-
Affects Version/s: 2.2.0
-
Component/s: Querying
-
None
-
Environment:Ubuntu
-
Linux
getLastError returning old/wrong/no data. The code that we are running works 100% when not sharded.
We have a 3 shard setup, each shard with 3 servers in a replica set. 3 config servers and 1 mongos running on the application server.
All querys are using safemode.
After going an update with a query that would match 0 documents the following is returned via getLastError()
"singleShard":"Set_01\/db1.test.co.uk,db5.test.co.uk,db9.test.co.uk",
"updatedExisting":true,
"n":1,
"lastOp":
,
"connectionId":1392,
"err":null,
"ok":1
However, no documents will have been updated so n=1 should be wrong as well as updatedExsisting.
When using a query that does match a document ( and does successfully update), occasionally we will get the following from getLastError()
"singleShard":"Set_02\/db2.test.co.uk,db6.test.co.uk,db7.test.co.uk",
"n":0,
"lastOp":
,
"connectionId":239,
"err":null,
"ok":1,
"writeback":
,
"instanceIdent":"mongo-01",
"updatedExisting":true,
"writebackGLE":{
"singleShard":"Set_02\/db2.test.co.uk,db6.test.co.uk,db7.test.co.uk",
"n":0,
"lastOp":
,
"connectionId":239,
"err":null,
"ok":1
},
"initialGLEHost":"Set_01\/db1.test.co.uk,db5.test.co.uk,db9.test.co.uk"
"lastOp" is sometimes the same, if that means anything?
- duplicates
-
SERVER-4532 GetLastError on sharded cluster can report incorrect result
- Closed