-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.6.0
-
Component/s: Replication
-
None
-
Environment:ubuntu 10.4, x86_64
-
Minor Change
-
ALL
python code:
err = db.command("getlasterror",
w = 2, # replicate to at least one slave
wtimeout = 1000 * timeout_s
)
Rather than return an error to be tested, if the above timesout, I get:
File "build/bdist.linux-x86_64/egg/pymongo/database.py", line 294, in command
pymongo.errors.OperationFailure: command SON([('getlasterror', 1), ('wtimeout', 2000), ('w', 2)]) failed: timed out waiting for slaves
If a wtimeout is supplied, that indicates that a timeout is expected behavior--not exceptional behavior.
It should simply return the result in the error object for examination, not throw OperationFailure.