[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: |