[SERVER-12578] Support in-place update of object/array elements when safe to do so Created: 03/Feb/14 Updated: 11/Jul/16 Resolved: 07/Apr/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code, Write Ops |
| Affects Version/s: | None |
| Fix Version/s: | 2.7.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | Performance, mutable::document | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Participants: | |||||
| Description |
|
We currently only support in-place element updates for primitive types. In-place updates for complex types is tricky, because even if the new object or array has the same size as the existing object, its internal layout may differ. That means that any Element objects that referred to regions of memory in the original layout would be invalidated once the damage vector was applied. Currently, the semantics of Document is that Elements are never invalidated. We could either:
|
| Comments |
| Comment by Githook User [ 07/Apr/14 ] |
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@10gen.com'}Message: |
| Comment by James Blackburn [ 25/Feb/14 ] |
|
See also: This can be fixed by something like: which implements |