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

Deletes read the document twice before deleting

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Execution Team 2020-11-02, Execution Team 2020-11-16

      When deleting a document, we perform two reads (and thus make two copies) of the document before actually deleting it.

      At least one document read is required to generate the keys to delete index entries, but this path could be optimized to only perform one read.

      The first read can happen in either the IXSCAN+FETCH or COLLSCAN stages. The document is then passed to the WorkingSet.

      The second read happens in Collection::deleteDocument. This second read is not technically required because at the point where we delete the document, we already have a version of the document from the WorkingSet.

            Assignee:
            brian.deleonardis@mongodb.com Brian DeLeonardis (Inactive)
            Reporter:
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: