[SERVER-47808] Modernize RecoveryUnit::Change interface Created: 27/Apr/20  Updated: 29/Oct/23  Resolved: 19/Nov/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.2.0

Type: Improvement Priority: Major - P3
Reporter: Henrik Edin Assignee: Gabriel Marks
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: 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
Participants:

 Description   

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



 Comments   
Comment by Githook User [ 19/Nov/21 ]

Author:

{'name': 'Gabriel Marks', 'email': 'gabriel.marks@mongodb.com', 'username': 'marksg07'}

Message: SERVER-47808 Add new registerChange overload to simplify Change code
Branch: master
https://github.com/mongodb/mongo/commit/de4424049eefff0fff45c07dc3819d8846ed8934

Comment by Githook User [ 19/Nov/21 ]

Author:

{'name': 'Gabriel Marks', 'email': 'gabriel.marks@mongodb.com', 'username': 'marksg07'}

Message: SERVER-47808 Simplify Change code
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/a8717863c3663772235417e38faec3961c0e5bbe

Generated at Thu Feb 08 05:15:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.