[SERVER-73588] Suppress memory leak notification about canceling migrations on shutdown Created: 03/Feb/23  Updated: 29/Oct/23  Resolved: 06/Feb/23

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 6.3.0-rc0

Type: Task Priority: Major - P3
Reporter: Antonio Fuschetto Assignee: Antonio Fuschetto
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-67732 mongod shutdown procedure doesn't shu... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2023-02-06
Participants:
Linked BF Score: 8

 Description   

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.



 Comments   
Comment by Githook User [ 06/Feb/23 ]

Author:

{'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}

Message: SERVER-73588 Suppress memory leak alerts on canceling migrations
Branch: master
https://github.com/mongodb/mongo/commit/6853acbf8e747da44e0d89ae7d4ed5c94a321f98

Generated at Thu Feb 08 06:25:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.