Applying insert-only doc-diffs should not require insert in StringMap

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 5.2.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Execution Team 2021-10-18
    • 135
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When preparing the docDiff for apply we put the insert field in a StringMap: https://github.com/mongodb/mongo/blob/92738c5fa0e8169299e5393e88159b8cbb9559ca/src/mongo/db/update/document_diff_applier.cpp#L106

      However, if it is an insert-only workload this map is not used and we just read from the insert vector: https://github.com/mongodb/mongo/blob/92738c5fa0e8169299e5393e88159b8cbb9559ca/src/mongo/db/update/document_diff_applier.cpp#L495-L504

      This should cut a StringMap insert for every measurement in time-series inserts.

            Assignee:
            Henrik Edin
            Reporter:
            Henrik Edin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: