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

Suppress memory leak notification about canceling migrations on shutdown

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • Sharding EMEA 2023-02-06
    • 8

      When a node steps down, the MigrationDestinationManager cancels any ongoing migration by spawning a new executor thread to run the cancellation code. This thread needs to allocate the necessary resources for the entire duration of the operation, reasonably for a negligible period of time.

      When mongod is shutdown, this procedure is triggered and the process terminates without waiting for this thread to finish. This is correctly identified as a memory leak.

      The obvious solution for this problem would be to join this thread, which is part of the TaskExecutorPool. Nevertheless, in the past this has already been considered and the hypothesis was rejected as it would have slowed down the mongod shutdown (see SERVER-51316).

      Waiting for a reorganization of the global pool/executor (which could tackle the problem on a larger scale), we should instruct LSAN to ignore memory leaking in this function.

            Assignee:
            antonio.fuschetto@mongodb.com Antonio Fuschetto
            Reporter:
            antonio.fuschetto@mongodb.com Antonio Fuschetto
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: