[SERVER-51042] TenantMigrationDonorService::Instance::run should capture 'this' as 'shared_from_this' Created: 18/Sep/20  Updated: 29/Oct/23  Resolved: 23/Sep/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.8.0

Type: Task Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: Jason Zhang
Resolution: Fixed Votes: 0
Labels: pm-1791_milestone-A
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Sharding 2020-10-05
Participants:

 Description   

The continuations should capture 'shared_from_this' because once the state document is deleted, all shared_ptr references to 'this' in the Primary-Only Service machinery are destroyed.

In the TenantMigrationDonorService::Instance's case, the state doc is marked as garbage collectable here, so can be deleted by the TTL index any time after that, including before theĀ final continuations run.



 Comments   
Comment by Githook User [ 23/Sep/20 ]

Author:

{'name': 'Jason Zhang', 'email': 'jason.zhang@mongodb.com', 'username': 'jz1242'}

Message: SERVER-51042 TenantMigrationDonorService::Instance::run should capture this as shared_from_this
Branch: master
https://github.com/mongodb/mongo/commit/af08def5775615358bc4e25af373b2a08887a15e

Generated at Thu Feb 08 05:24:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.