[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: |
|
||||
| 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: |
| 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: Closes #828 Signed-off-by: Benety Goh <benety@mongodb.com> |