Could somebody help me understand the below last error message? This
result is from an update of an object (which has been written to Mongo
shortly before). We are using MongoDB 1.8.3 and Java driver 2.7.2
1. Insert object into shard (successfully)
2. Update object by _id (WriteResult writeResult =
dbCollection.update(query, update, false, false, WriteConcern.SAFE);)
query looks like: {_id : XYZ}
update looks like: {$set : {foo : bar, foo2 : bar2}}
Question #1: Result shows "updatedExisting" : true but "n" : 0.
Shouldn't updatedExisting be false if n is 0? At least when I try
locally against a non-shared Mongo it behaves like this. From what I
can tell the update has been successful.
Question #2: What do the writebackGLE and initialGLEHost properties
mean? Why do they mention a different ReplSet?
Question #3: Is there any way to see what "lastOp":5686019109100191745
really has been doing on the backend?
Thanks in advance :-)
- Philipp
{
writeResult = {
"serverUsed":"127.0.0.1:27017/myDB",
"singleShard":"ReplSet3/ec2-xxxx.compute-1.amazonaws.com:
27018,ec2-xxxx.compute-1.amazonaws.com:27018,ec2-
xxxx.compute-1.amazonaws.com:27018",
"n":0,
"lastOp":5686019109100191745,
"connectionId":1524,
"err":null,
"ok":1.0,
"updatedExisting":true,
"wtime":0,
"writebackGLE": {
"singleShard":"ReplSet3/ec2-xxxx.compute-1.amazonaws.com:
27018,ec2-xxxx.compute-1.amazonaws.com:27018,ec2-
xxxx.compute-1.amazonaws.com:27018",
"n":0,
"lastOp":5686019109100191745,
"connectionId":1524,
"err":null,
"ok":1.0
},
"initialGLEHost":"ReplSet1/ec2-xxxx.compute-1.amazonaws.com:
27018,ec2-xxxx.compute-1.amazonaws.com:27018,ec2-
xxxx.compute-1.amazonaws.com:27018"
}
}
I have opened the following bug https://jira.mongodb.org/browse/SERVER-4532.
Might the migration problem be part of the problem?
Cheers
Philipp