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

Consider making TransactionCoordinator only constructible as shared_ptr

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Replication

      After SERVER-91865, TransactionCoordinator inherits from std::enable_shared_from_this and uses shared_from_this extensively. In that change, we decided to keep the old constructor public, which does allow misuse by constructing a non-shared_ptr TransactionCoordinator. We should consider making it only constructible as a shared_ptr by exposing a factory function or similar.

            Assignee:
            Unassigned Unassigned
            Reporter:
            ryan.berryhill@mongodb.com Ryan Berryhill
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: