[SERVER-21571] Leaked ChunkManager object if an exception happens while loading collection metadata Created: 19/Nov/15  Updated: 21/Jan/16  Resolved: 23/Nov/15

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.0.9, 3.2.0-rc5

Type: Bug Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Sprint: Sharding D (12/11/15)
Participants:

 Description   

If an exception happens while the collection metadata is being loaded, mongos will leak a ChunkManager object, which may or may not contain partial metadata as well.

The reason for this is that we pass a raw pointer in this call. This could be fixed by using a unique_ptr so that the incomplete ChunkManager will be deleted on exception.



 Comments   
Comment by Githook User [ 07/Jan/16 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-21571 Do not leak ChunkManager object on error
Branch: v3.0
https://github.com/mongodb/mongo/commit/5e8ffcdbecdcd86db691dea8cce13a8881314c8c

Comment by Githook User [ 23/Nov/15 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-21571 Do not leak ChunkManager object on error
Branch: master
https://github.com/mongodb/mongo/commit/18f6662ca5e2ceabb38d69e3c5e99ee5b53ff4e4

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