Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-70984

Decouple the concepts "in-place updates" and "index updates"

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0, 7.0.0-rc3
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • v7.0
    • QE 2023-02-06, QE 2023-02-20, QE 2023-03-06, QE 2023-03-20, QE 2023-04-03, QE 2023-04-17, QE 2023-05-01

      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.

            Assignee:
            irina.yatsenko@mongodb.com Irina Yatsenko (Inactive)
            Reporter:
            arun.banala@mongodb.com Arun Banala
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: