Change stream tests make invalid assumptions about thread scheduling on the server

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor - P4
    • 8.1.0-rc0
    • Affects Version/s: 7.3.0-rc0, 6.0.13, 5.0.24, 4.4.28, 7.0.6
    • Component/s: Internal Code
    • None
    • Query Execution
    • Fully Compatible
    • ALL
    • Hide

      Add a pause of 1 second before https://github.com/10gen/mongo/blob/acdc463fe60bdc85aeced25297041b4051a0fc33/src/mongo/db/query/plan_executor_impl.cpp#L579 and execute jstests/noPassthrough/report_post_batch_resume_token_mongod.js in no_passthrough suite.
      Also please see: https://jira.mongodb.org/browse/BF-30776.

      Show
      Add a pause of 1 second before https://github.com/10gen/mongo/blob/acdc463fe60bdc85aeced25297041b4051a0fc33/src/mongo/db/query/plan_executor_impl.cpp#L579 and execute jstests/noPassthrough/report_post_batch_resume_token_mongod.js in no_passthrough suite. Also please see: https://jira.mongodb.org/browse/BF-30776 .
    • QE 2024-01-22, Execution Team 2024-11-11, Execution Team 2024-11-25
    • 5
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Change stream tests make invalid assumptions about thread scheduling on the server, or, more precisely, about valid responses to getMore command on cursors on change stream cursors.
      Actually, it is valid for the server to return zero results on a change stream cursor even if there are change events available at the moment. It can happen in case when the reading thread on the server does not get enough time allocated and the timeout on the change stream cursor (command "getMore") expires (1 second by default).
      The test and the location that failed: https://github.com/10gen/mongo/blob/acdc463fe60bdc85aeced25297041b4051a0fc33/jstests/noPassthrough/report_post_batch_resume_token_mongod.js#L36.
      Likely, one of the places where that assumption is made is at https://github.com/10gen/mongo/blob/acdc463fe60bdc85aeced25297041b4051a0fc33/src/mongo/shell/query.js#L845-L851.

            Assignee:
            Jan Steemann
            Reporter:
            Mindaugas Malinauskas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: