I'm trying to implement the "Update if Current" pattern from
http://www.mongodb.org/display/DOCS/Atomic+Operations
But it seems mongo (HEAD) is never reporting a failed update.
Please see the attached test-case.
Also this is the response that I see on the wire for any update:
T +0.000254 127.0.0.1:27017 -> 127.0.0.1:41211 [AP]
53 00 00 00 c4 4c 65 81 0b 00 00 00 01 00 00 00 S....Le.........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
01 00 00 00 2f 00 00 00 0a 65 72 72 00 08 75 70 ..../....err..up
64 61 74 65 64 45 78 69 73 74 69 6e 67 00 00 10 datedExisting...
6e 00 00 00 00 00 01 6f 6b 00 00 00 00 00 00 00 n......ok.......
f0 3f 00 .?.
cheers
-jj
I tried all of that, nothing works.
Also see the test-case, it uses both safe=True and
Connection.db.error() but neither reports a failure.
cheers
-jj
Ideally I think the underlying getLastError() should be renamed to
getLastStatus() - because that's what it really does. Then the driver
APIs could also grow a getLastStatus() (in addition to the existing
error()) and everything would be consistent again.
cheers
-jj