Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-85172

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 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

      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@mongodb.com Jan Steemann
            Reporter:
            mindaugas.malinauskas@mongodb.com Mindaugas Malinauskas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: