[SERVER-15701] Storage engine's updateWithDamages function should include the old record Created: 17/Oct/14  Updated: 25/Oct/14  Resolved: 17/Oct/14

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 2.7.7
Fix Version/s: 2.7.8

Type: Improvement Priority: Minor - P4
Reporter: John Esmet Assignee: Unassigned
Resolution: Done Votes: 0
Labels: pull-request
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Tested
Participants:

 Description   

The current API for updateWithDamages does not include the record to be modified, so the engine has to re-read it in order to apply the damages locally and write the new value. The read is going to be in memory because the caller had to read it first, but it's still a non-trivial amount of CPU work.

We should just pass down a RecordData constructed from the base pointer and objsize of the target BSONObj. Unit tests can be modified to fit this API without a lot of churn.



 Comments   
Comment by Githook User [ 17/Oct/14 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-15700 SERVER-15701 fixed compilation error
Branch: master
https://github.com/mongodb/mongo/commit/1ee210fa58c2c9eb547095c1d26f8f080c6ec34f

Comment by Githook User [ 17/Oct/14 ]

Author:

{u'username': u'esmet', u'name': u'John Esmet', u'email': u'john.esmet@gmail.com'}

Message: SERVER-15701 Pass the old object down to updateWithDamages in the form
of a RecordData. This way, the storage engine does not need to re-read
the old value in order to perform the update.

Closes #828

Signed-off-by: Benety Goh <benety@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/7253b35c65c15c50272a1750ecc82f1eb8e1285b

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