Relax test for NODE-6878 regression to align with mongos 9.0+ behaviour

XMLWordPrintableJSON

    • Type: Build Failure
    • Resolution: Fixed
    • Priority: Unknown
    • 7.2.0
    • Affects Version/s: None
    • Component/s: None
    • 1
    • Not Needed
    • None
    • Not Needed
    • 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

      The new MongoDB 9.0 server on sharded topology now proactively exhausts the cursor (returns cursorId: 0) when the limit is satisfied, making the emptyGetMore optimization unnecessary.
      The test asserts that emptyGetMore must be called, but the server change means the code path is simply never reached - the cursor is already dead before the optimization can trigger.

      The fix for NODE-6878 itself (making emptyGetMore a proper CursorResponse with all required fields for rewind()) is still valid - it just can't be exercised on this server version with sharded topology. The test needs to be relaxes to test actual regression with unwind + toArray, there is no need to validate spy on `emptyGetMore`.

      Evergreen patch with 8.0 and 9.0 sharded topologies printing out server responses (note cursorId: 0):
      https://spruce.corp.mongodb.com/version/69d8e357d33d560007c98599/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC

      AC:

      • remove spy from 'regression test (NODE-6878): CursorResponse.emptyGetMore contains all CursorResponse fields' test, validate actual unwind + toArray works on old and new mongos.

            Assignee:
            Sergey Zelenov
            Reporter:
            Sergey Zelenov
            Daria Pardue
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: