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

OplogBufferCollection::pushAllNonBlocking should use vector::reserve

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • None
    • 3.5.9
    • Replication
    • Replication

    Description

      Instead of filling the vector with default constructed objects, and then throwing them out by calling std::transform:

      https://github.com/mongodb/mongo/blob/r3.5.9/src/mongo/db/repl/oplog_buffer_collection.cpp#L178

      Once this done, the default constructor for InsertStatement can also be removed:
      https://github.com/mongodb/mongo/blob/1550eb477fcf883e861f63ffc988a6060a2fbfb1/src/mongo/db/catalog/collection.h#L99

      Attachments

        Activity

          People

            backlog-server-repl Backlog - Replication Team
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: