If Bulk operation is interrupted (by failover, by network failure, ...) current version of txmongo with combination of PyMongo 3.6.0 raises KeyError from coll.bulk_write. This is because we are calling pymongo.bulk._merge_command without checking it for being proper bulk response.
Coverage increased (+0.005%) to 95.2% when pulling 49914476f1fc687ebb3602358d2af7550e7c99bc on IlyaSkriblovsky:pymongo3.6-bulk-operationfailure into 3bdd644c440ba1c662a40c624818ea88b2d1c804 on twisted:master.
Coverage increased (+0.005%) to 95.2% when pulling 773b9637981f8d4ef604a1a23b905c77c74bd856 on IlyaSkriblovsky:pymongo3.6-bulk-operationfailure into 3bdd644c440ba1c662a40c624818ea88b2d1c804 on twisted:master.
Coverage increased (+0.005%) to 95.2% when pulling 773b9637981f8d4ef604a1a23b905c77c74bd856 on IlyaSkriblovsky:pymongo3.6-bulk-operationfailure into 3bdd644c440ba1c662a40c624818ea88b2d1c804 on twisted:master.
Coverage increased (+0.005%) to 95.2% when pulling 773b9637981f8d4ef604a1a23b905c77c74bd856 on IlyaSkriblovsky:pymongo3.6-bulk-operationfailure into 3bdd644c440ba1c662a40c624818ea88b2d1c804 on twisted:master.
If Bulk operation is interrupted (by failover, by network failure, ...) current version of txmongo with combination of PyMongo 3.6.0 raises KeyError from
coll.bulk_write
. This is because we are callingpymongo.bulk._merge_command
without checking it for being proper bulk response.