-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Component/s: CRUD & Command-Level Operations
-
None
-
Needed - No Spec Changes
Summary
The CRUD bulk write spec says:
Encountering a top-level error MUST halt execution of a bulk write for both ordered and unordered bulk writes. This means that drivers MUST NOT attempt to retrieve more responses from the cursor or execute any further bulkWrite batches and MUST immediately throw an exception. If the results cursor has not been exhausted on the server when a top-level error occurs, drivers MUST send the killCursors command to attempt to close it.
Motivation
We want prose tests covering both halves of the requirement, for both ordered and unordered bulk writes.
Acceptance Criteria
- Add a prose test with a bulk write that needs at least 2 batches. Fail the first bulkWrite with a fail point and assert that only one bulkWrite command was sent. The error may be a plain top-level error rather than a BulkWriteException.
- Cursor: add a prose test whose results need at least 2 getMores. Fail the first getMore and assert that only one getMore was sent and that killCursors was sent. This is a new test rather than a change to prose test 9, because changing 9 would alter its existing assertions (e.g. upsertedCount).
- Run both tests with ordered: true and ordered: false.
- related to
-
DRIVERS-3670 Add test coverage for top-level error handling in multi-batch bulkWrite
-
- In Review
-
- split to
-
CDRIVER-6555 Add prose tests that a top-level error halts client bulkWrite execution (ordered and unordered)
-
- Blocked
-
-
CSHARP-6297 Add prose tests that a top-level error halts client bulkWrite execution (ordered and unordered)
-
- Blocked
-
-
CXX-3624 Add prose tests that a top-level error halts client bulkWrite execution (ordered and unordered)
-
- Blocked
-
-
JAVA-6365 Add prose tests that a top-level error halts client bulkWrite execution (ordered and unordered)
-
- Blocked
-
-
NODE-7992 Add prose tests that a top-level error halts client bulkWrite execution (ordered and unordered)
-
- Blocked
-
-
PHPLIB-1991 Add prose tests that a top-level error halts client bulkWrite execution (ordered and unordered)
-
- Blocked
-
-
PYTHON-6225 Add prose tests that a top-level error halts client bulkWrite execution (ordered and unordered)
-
- Blocked
-
-
RUBY-4016 Add prose tests that a top-level error halts client bulkWrite execution (ordered and unordered)
-
- Blocked
-
-
RUST-2544 Add prose tests that a top-level error halts client bulkWrite execution (ordered and unordered)
-
- Blocked
-
-
GODRIVER-4242 Add prose tests that a top-level error halts client bulkWrite execution (ordered and unordered)
-
- Needs Review
-