diff options
author | Michael Cahill <michael.cahill@wiredtiger.com> | 2015-02-24 17:41:59 +1100 |
---|---|---|
committer | Michael Cahill <michael.cahill@wiredtiger.com> | 2015-02-24 17:41:59 +1100 |
commit | 03cb722691012dbb480c3238247d76cb6dcf7d9d (patch) | |
tree | a986199a993b51723634495e800247ddf8e71951 | |
parent | 3ac223fffcffc9dc61298ccf51857b88c199ee0a (diff) | |
parent | 468ebeee06ee6ddd6360c51132b6dd3c5b93064a (diff) | |
download | mongo-03cb722691012dbb480c3238247d76cb6dcf7d9d.tar.gz |
Merge branch 'develop' into mongodb-3.0
-rw-r--r-- | src/evict/evict_lru.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/evict/evict_lru.c b/src/evict/evict_lru.c index 35be3df9185..e3d8ea6a4e0 100644 --- a/src/evict/evict_lru.c +++ b/src/evict/evict_lru.c @@ -284,11 +284,17 @@ __wt_evict_create(WT_SESSION_IMPL *session) session = conn->evict_session; /* + * If eviction workers were configured, allocate sessions for them now. + * This is done to reduce the chance that we will open new eviction + * sessions after WT_CONNECTION::close is called. + * * If there's only a single eviction thread, it may be called upon to * perform slow operations for the block manager. (The flag is not * reset if reconfigured later, but I doubt that's a problem.) */ - if (conn->evict_workers_max == 0) + if (conn->evict_workers_max > 0) + WT_RET(__evict_workers_resize(session)); + else F_SET(session, WT_SESSION_CAN_WAIT); /* |