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

Investigate usage validity of CollectionPtr::CollectionPtr_UNSAFE

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Security
    • Fully Compatible
    • Server Security 2025-04-14, Server Security 2025-04-28
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None

      Please review the code associated with this ticket (mentioned as TODO(TICKET-NUMBER) in the code).
      Using the CollectionPtr constructor with a Collection* is considered as unsafe as the Collection* could go stale. Please use the CollectionPtr(ConsistentCollection collection) constructor instead of the CollectionPtr::CollectionPtr_UNSAFE static function through the acquisition API or write a reasoning as a replacement of the TODO comment in the code why is it not feasible to replace.

            Assignee:
            erwin.pe@mongodb.com Erwin Pe
            Reporter:
            adam.farkas@mongodb.com Wolfee Farkas
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: