-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: CSOT
-
2
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Use Case
As a... Node developer
I want... to pick up the latest CSOT test specs and run them without errors
So that... we are consistent with the latest test specs.
User Experience
- What is the desired/expected outcome for the user once this ticket is implemented?
The latest CSOT test specs indicate that we should be short-circuiting socket timeouts by validating if maxAwaitTimeMS < operational timeout for tailable awaitData cursors.
At the moment, that is not the case for the Node driver: we are not checking that maxAwaitTimeMS < operational timeout. We allow the operation to succeed (if it happens quickly enough) or to face an imminent timeout error.
Instead, we shouldn't even be attempting the operation and should be quickly failing with a client-side non-timeout error, like we sometimes do in https://github.com/mongodb/node-mongodb-native/blob/main/src/cursor/abstract_cursor.ts#L296-L298:
throw new MongoInvalidArgumentError( 'Cannot specify maxAwaitTimeMS >= timeoutMS for a tailable awaitData cursor' );
Verification:
1. Add maxAwaitTimeMS/timeout implementation
2. Remove `NODE-7297` suppressions from `test/integration/client-side-operations-timeout/client_side_operations_timeout.spec.test.ts`
3. Run all spec tests
4. Everything should pass
Risks/Unknowns
- What could go wrong while implementing this change? (e.g., performance, inadvertent behavioral changes in adjacent functionality, existing tech debt, etc)
- If the check is done incorrectly, customers may see exceptions from new places
Acceptance Criteria
Implementation Requirements
- Throw MongoInvalidArgumentError when maxAwaitTimeMS/timeout are in conflict.
Testing Requirements
- All tests are passing.
- No NODE-7297 skips
Documentation Requirements
- N/A
Follow Up Requirements
- N/A
- is related to
-
NODE-7111 Ensure Driver Errors for Tailable AwaitData Cursors on Invalid maxAwaitTimeMS
-
- Closed
-