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

Avoid leaking exceptions in establishCursors cleanup callback

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.4.0-rc7, 4.7.0
    • Affects Version/s: 4.5.1, 4.4.0-rc4
    • Component/s: Querying
    • Labels:
    • Fully Compatible
    • ALL
    • v4.4
    • Query 2020-06-01

      This uassert can trigger when the task executor is shutting down. The exception will bubble up, through this function marked noexcept. I would suggest getting rid of the uassert and instead log a message when args.status is not OK.

      It would also be good to add some documentation about the rules of callbacks and exception throwing. My guess is that callback functions passed to TaskExecutor::scheduleWork() should never throw but I don't see any warnings about it in task_executor.h.

            nicholas.zolnierz@mongodb.com Nicholas Zolnierz
            ian.boros@mongodb.com Ian Boros
            0 Vote for this issue
            4 Start watching this issue