Investigate errors in updated spec tests for "Check for timeout in tailable-awaitData unified spec tests"

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: CSOT
    • 2
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • 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

      Documentation Requirements

      • N/A

      Follow Up Requirements

      • N/A

            Assignee:
            Bailey Pearson
            Reporter:
            Pavel Safronov
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: