diff options
author | Michael Cahill <michael.cahill@mongodb.com> | 2016-02-03 16:09:07 +1100 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2016-02-03 16:09:07 +1100 |
commit | f801ddca2f004218759dd914c3e6df7964e8f260 (patch) | |
tree | 1e7a603304610fbda41090b92aafbecc8ed3e422 /src/txn/txn_ckpt.c | |
parent | 9f10e410fc8ecd0c9a610eb726c17b2d0e28a097 (diff) | |
download | mongo-f801ddca2f004218759dd914c3e6df7964e8f260.tar.gz |
WT-2378 Always wait for the handle list lock.
That is, the "lock_wait=false" configuration to WT_SESSION::drop does
not apply to the handle list lock. The reason is code (specifically in
LSM) that acquires the handle list lock to get an LSM tree, does some
work, then acquires the handle list lock again when discarding the tree.
If the first acquire happens to succeed and the second acquire fails,
the tree is left in the system with its reference count bumped.
Diffstat (limited to 'src/txn/txn_ckpt.c')
-rw-r--r-- | src/txn/txn_ckpt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/txn/txn_ckpt.c b/src/txn/txn_ckpt.c index 725e46acb0c..6a2c1eef826 100644 --- a/src/txn/txn_ckpt.c +++ b/src/txn/txn_ckpt.c @@ -184,7 +184,7 @@ __checkpoint_apply(WT_SESSION_IMPL *session, const char *cfg[], session->ckpt_handle[i].dhandle, ret = (*op)(session, cfg)); else - WT_WITH_HANDLE_LIST_LOCK(session, ret, + WT_WITH_HANDLE_LIST_LOCK(session, ret = __wt_conn_btree_apply_single(session, session->ckpt_handle[i].name, NULL, op, cfg)); WT_RET(ret); @@ -387,7 +387,7 @@ __txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[]) */ WT_WITH_SCHEMA_LOCK(session, ret, WT_WITH_TABLE_LOCK(session, ret, - WT_WITH_HANDLE_LIST_LOCK(session, ret, + WT_WITH_HANDLE_LIST_LOCK(session, ret = __checkpoint_apply_all( session, cfg, __wt_checkpoint_list, NULL)))); WT_ERR(ret); |