[SERVER-5773] mongo::PeriodicTask::Runner cleanup Created: 07/May/12  Updated: 06/Dec/22  Resolved: 29/Jun/20

Status: Closed
Project: Core Server
Component/s: Internal Client
Affects Version/s: 2.0.4
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: David Schneider Assignee: DO NOT USE - Backlog - Dev Tools
Resolution: Done Votes: 0
Labels: cxxcopy, move-sa, platforms-re-triaged
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-8707 dbclient_rs_test threading issue Closed
is depended on by SERVER-5520 Shutdown rewrite (tracking ticket) Closed
Assigned Teams:
Developer Tools
Operating System: ALL
Participants:

 Description   

I'm testing your application using c++ mongoclient with valgrind and found, that the PeriodicTasks stored in PeriodicTask::Runner aren't destroyed during application shutdown. Off course I know the OS will do that for us, but just to make the code cleaner.

Possible fix:
PeriodicTask::Runner::~Runner() {
scoped_spinlock lk( _lock );
for ( size_t i=0; i<_tasks.size(); i++ )

{ delete _tasks[i]; _tasks[i] = 0; }

}



 Comments   
Comment by Mira Carey [ 29/Jun/20 ]

We've rewritten the periodic task infrastructure in the server, so that this code is no longer in use

Comment by Eliot Horowitz (Inactive) [ 08/May/12 ]

Need to check shutdown before implementing.

Generated at Thu Feb 08 03:09:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.