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

Change-Stream client timeoutMs detaches and creates another collscan instead of killing old collscan

    • Query Execution
    • ALL
    • QE 2024-09-16, QE 2024-09-30

      Hi,

      Observed in mongocxx 3.7.0 with MongoDB version 6.0.15.

      Seems that when starting a client with (example) timeoutMs=5000 and the starting a change-stream watch() with it:

      1. it is getting timed out internally without throwing any exception
      2. it starts another collscan operation on the same stream
      3. this creates a situation that the watch creates a CPU leak - collscan is getting piled up, until the server is arriving to 100% CPU and hundreds of collscans are created in a short time.

      Issue was fixed by using the default timeoutMs=0 and letting the collscan whatever time is needs.

      Is a known issue? or if this is the expected behavior then why is that?

      Thanks.

            Assignee:
            denis.grebennicov@mongodb.com Denis Grebennicov
            Reporter:
            oraiches@zadarastorage.com Oded Raiches
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: