[SERVER-40520] Avoid dropping temporary $out collection if everything succeeded Created: 08/Apr/19 Updated: 29/Oct/23 Resolved: 23/Apr/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.11 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Charlie Swanson | Assignee: | Ian Boros |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Sprint: | Query 2019-05-06 | ||||
| Participants: | |||||
| Linked BF Score: | 0 | ||||
| Description |
|
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. |
| Comments |
| Comment by Githook User [ 23/Apr/19 ] |
|
Author: {'email': 'puppyofkosh@gmail.com', 'name': 'Ian Boros', 'username': 'puppyofkosh'}Message: |