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

Avoid dropping temporary $out collection if everything succeeded

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.11
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • Labels:
      None
    • Fully Compatible
    • Query 2019-05-06
    • 0

      It looks like ever since this commit we started unconditionally dropping the target collection when we're finished with $out mode "replaceCollection". Before this, we would only drop the temp namespace if the command didn't fully succeed since we reset _tempNS after finishing the inserts. Because all of this is happening within the DESTRUCTOR_GUARD, the exception is swallowed and there is no error reported back to the client. So there is no actual impact of this change, but we could probably gain back a little performance and sanity by avoiding dropping a non-existent collection at the end of every $out.

            Assignee:
            ian.boros@mongodb.com Ian Boros
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: