-
Type:
Bug
-
Resolution: Gone away
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
ALL
-
200
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Summary
The bulk_write_sharded_collections_jscore_passthrough suite fails with a JavaScript TypeError: getSecondaryOk is not a function when running jstests/core/query/doc_validation/prepare_constraint_validation_level.js.
Root Cause
The test exercises bypassDocumentValidation writes while prepareConstraintValidationLevel is set, expecting a server-side error. The bulk-write override (jstests/libs/override_methods/single_crud_op_as_bulk_write.js) intercepts insert and converts it to bulkWrite. In the multi-mongos topology used by this passthrough suite, OverrideHelpers obtains a MultiRouterMongo proxy object. That proxy does not implement getSecondaryOk(), so the override crashes with a JS-level TypeError before the expected server error is ever received.
Workaround
Exclude prepare_constraint_validation_level.js from the single_op_core_excluded_files list in buildscripts/resmokeconfig/matrix_suites/overrides/bulk_write.yml.
Permanent Fix
Implement getSecondaryOk() (and any other missing methods) on MultiRouterMongo so that the bulk-write override works correctly in the multi-mongos topology, or adjust the override to not call getSecondaryOk() unnecessarily.