[SERVER-30492] Drop can fail because it is run in a session with cached cursors Created: 03/Aug/17 Updated: 30/Oct/23 Resolved: 14/Sep/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 3.6.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Michael Cahill (Inactive) | Assignee: | Michael Cahill (Inactive) |
| 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: | Storage 2017-08-21, Storage 2017-09-11, Storage 2017-10-02 | ||||||||
| Participants: | |||||||||
| Description |
|
While testing a simple workload that creates and drops collections in a tight loop (see below), I noticed that many drop operations could not be completed immediately and instead were queued and retried later. Since the queuing and retrying is expensive, I looked into what was causing the drops to fail the first time and noticed that there could be cursors active in the session used for the drop operation that were not being closed before attempting the drop. Test:
The fix is to call closeAllCursors(uri) on the enclosing session. |
| Comments |
| Comment by Ramon Fernandez Marina [ 14/Sep/17 ] |
|
Author: {'username': u'michaelcahill', 'name': u'Michael Cahill', 'email': u'michael.cahill@mongodb.com'}Message: |