The current code has this odd logic to disable "in-place updates" if any of the indexes are being updated as part of the update operation. After SERVER-65364, we will no longer need to compute this global indexesAffected flag. This "in-place updates" is the only place where the indexesAffected flag will be used.
After a bunch of discussions, we've realized that the "in-place updates" is a concept of MMAPv1 storage engine, which had true in-place updates, where the old object and new object pointed to the same memory. So if the update affected secondary indexes those would still need to be updated because the index key isn't referring the same memory as oldObj / newObj. It should be safe to remove all logic that has in-place updates and index updates coupling.
As a consequence of removing the above mentioned code block, we'll be able to do a nice cleanup of the computation logic of indexesAffected flag.
- depends on
-
SERVER-65364 Update logic should pass info about which fields changed to index layer
- Closed
- is duplicated by
-
SERVER-74136 UpdateDriver can miss index update
- Closed
- related to
-
SERVER-76390 Refine UpdateIndexData class so that it has index to field path mapping
- Closed