Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-53451

All continuations in resharding primary only services run methods should capture this as shared_from_this

    • Type: Icon: Bug Bug
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Sharding
    • ALL

      When a state document is deleted, any shared_ptr references to 'this' in the primary only service machinery are destroyed. If the future chain in any primary only service's run method has not finished and the state document for that object has been removed, we'll seg fault and crash. Each service captures 'this' as 'shared_from_this' after the point that it expects that its state doc will be removed, but to protect against seg faulting (and crashing) in the event that a user accidentally deletes a doc or drops the collection entirely we should capture 'this' as 'shared_from_this' for each continuation.

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            janna.golden@mongodb.com Janna Golden
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: