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

Replace raw pointer Collection access with shared_ptr

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Execution Team 2022-02-21

    Description

      I'm wondering whether we really need to maintain separate access functions that return raw pointer vs shared_ptr to Collection instances from the CollectionCatalog. Could we simplify code by always using shared_ptr? We're moving in that direction anyway, removing locks and supporting versioned instances and copy-on-write.

      I suspect that any small performance gain of using a raw pointer instead of a shared_ptr might could irrelevant, if it exists. On the other hand, it would simplify our code to use shared_ptr consistently.

      Attachments

        Activity

          People

            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: