[SERVER-12732] Permit delta-based updates (update by a damage vector) to indexed fields Created: 14/Feb/14 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | Performance | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Assigned Teams: |
Query Execution
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Participants: | |||||
| Description |
|
The update code has two paths for writing an update to a document:
The update with damages path cannot currently be used for updates that affect indexes. (See the code here where we turn off in-place updates when indexes are affected.) We should lift this restriction in order to allow more updates to use the optimized code path. Original descriptionIn the current update framework updates to indexed fields cannot be 'fastmods', meaning that they require re-serializing the document. This makes simple updates to indexed fields more expensive than they need to be. We should improve the interaction between the update framework and the index update subsystem to permit fastmod updates to indexed fields. |
| Comments |
| Comment by David Storch [ 24/Apr/18 ] |
|
This limitation still exists. The code which computes the set of index keys to delete and index keys to insert relies on the full pre-image and post-image of the document: Removing this restriction would require us to improve the key generation code to be able to compute index key changes from the damage vector. |
| Comment by James Blackburn [ 25/Feb/14 ] |
|
See also: This can be fixed by something like: which implements |