mongodb/mongo — pull request #828 by esmet (2014-10-17 02:19:58+00:00)
Title: Modified the storage engine's updateWithDamages API

https://jira.mongodb.org/browse/SERVER-15701

The storage engine updateWithDamages function now takes a RecordData that represents the object to be modified. The caller has this data readily available. With the old record as a parameter, the engine no longer needs to re-fetch it in order to apply the update and write the changes. I have also included a typo fix: s/damange/damage

There should be a non-trivial performance improvement for in-place and in-memory workloads (common / important use case) with this change.

I did not attempt to use the oldRec in any existing storage implementation, because:
- The mmap engine does not really benefit from getting oldRec - it can access the record data in constant time through the already-provided DiskLoc.
- The heap engine is for testing and isn't important.
- The rocks engine will definitely benefit, but I left the optimization for the Rocks developers, since the rocks engine is under their jurisdiction.