[SERVER-30112] OplogBufferCollection::pushAllNonBlocking should use vector::reserve Created: 12/Jul/17  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Replication
Affects Version/s: 3.5.9
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Randolph Tan Assignee: Backlog - Replication Team
Resolution: Unresolved Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Replication
Participants:

 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


Generated at Thu Feb 08 04:22:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.