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

avoid copying NamespaceStringOrUUID vector in OptionsWithSecondaryCollections

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • Fully Compatible
    • Execution NAMR Team 2023-07-24

      Currently to provide a list of secondary namespaces to the `AutoGetCollection` RAII types, we pass a copy of the secondary namespaces to OptionsWithSecondaryCollections. This vector of namespaces is not retained by the RAII type after constructing the `AutoGet` object. As proposed in a comment on this ticket, it would be nice to provide a way for the constructor to accept iterators into an existing vector of secondary namespaces rather than have to make a copy of the entire vector.

      ====== OLD DESCRIPTION ======

      In SERVER-59958, we added multi-collection support to the `AutoGetCollectionForRead` helpers, It would be convenient to to have overloads for the constructors to accept a list of namespaces for the primary and secondary collections without having to provide the defaults for other constructor arguments such as viewMode or deadline.

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            benety.goh@mongodb.com Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: