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

Modernize RecoveryUnit::Change interface

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.2.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • Execution Team 2020-05-18, Execution Team 2020-06-01, Execution Team 2021-08-09, Execution Team 2021-11-15, Execution Team 2021-11-29

      The interface around RecoveryUnit::Change is an abstract interface where the callers pass in an instance as a unique_ptr. If this was based on std::function instead we could take advantage of the small object optimization where no memory allocation is needed if the callee is small.

      Example of callback that is affected by this:
      https://github.com/mongodb/mongo/blob/d140082164a67ebc5eb935aa7982b208f18ea274/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp#L1899-L1914

            Assignee:
            gabriel.marks@mongodb.com Gabriel Marks
            Reporter:
            henrik.edin@mongodb.com Henrik Edin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: