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

Update logic should pass info about which fields changed to index layer

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • v6.0
    • QE 2022-09-19, QE 2022-10-03, QE 2022-10-17, QE 2022-10-31, QE 2022-11-14, QE 2022-11-28, QE 2022-12-12, QE 2022-12-26
    • 114
    • 5

      Right now when we do an update the index layer gets the pre- and post-image document of the update. Then it will extract keys from both and perform a symmetric set difference to see which keys need to be added or removed updated in the index. And it does this for each index. This is wasteful for two reasons:

      1. We should be able to completely skip over indexes of fields that didn't change.
      2. For indexes that cover multiple paths independently (eg wildcard and columnar, but not text), they can completely skip over fields that they know didn't change.

      Since most updates don't update most fields, most of the index work we do on updates is wasteful work to detect which fields didn't change.

            Assignee:
            alberto.massari@mongodb.com Alberto Massari
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: