[SERVER-31912] waitUntilDurable() should use its own WT_SESSION, not one from the cache Created: 10/Nov/17 Updated: 30/Oct/23 Resolved: 13/Nov/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 3.6.0-rc4 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Eric Milkie | Assignee: | Eric Milkie |
| 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-11-13 | ||||||||
| Participants: | |||||||||
| Description |
|
waitUntilDurable() only needs a session to call log_flush() and checkpoint(). Since it uses no cursors, it should be fine to have it simply use one long-lived session object for this, rather than getting a session out of the cache every time. |
| Comments |
| Comment by Githook User [ 13/Nov/17 ] |
|
Author: {'name': 'Eric Milkie', 'username': 'milkie', 'email': 'milkie@10gen.com'}Message: |
| Comment by Eric Milkie [ 10/Nov/17 ] |
|
Ah I see, there is another code path in that function that uses a session and is not mutex protected. However, I'm not interested in optimizing that codepath, so it will continue to use a cached session for its work. |
| Comment by Eric Milkie [ 10/Nov/17 ] |
|
They do, but the place where the function makes calls on the session is mutex protected, and threads that block on the mutex are short-circuited when they finally acquire it. |
| Comment by Andy Schwerin [ 10/Nov/17 ] |
|
Do you mean one session used by all the threads that simultaneously call waitForDurable? A bunch of threads call that, right? |