summaryrefslogtreecommitdiff
path: root/src/schema
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2016-02-03 16:09:07 +1100
committerMichael Cahill <michael.cahill@mongodb.com>2016-02-03 16:09:07 +1100
commitf801ddca2f004218759dd914c3e6df7964e8f260 (patch)
tree1e7a603304610fbda41090b92aafbecc8ed3e422 /src/schema
parent9f10e410fc8ecd0c9a610eb726c17b2d0e28a097 (diff)
downloadmongo-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/schema')
-rw-r--r--src/schema/schema_drop.c2
-rw-r--r--src/schema/schema_rename.c2
-rw-r--r--src/schema/schema_worker.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/schema/schema_drop.c b/src/schema/schema_drop.c
index 6ac76930c9a..ead8cc45c62 100644
--- a/src/schema/schema_drop.c
+++ b/src/schema/schema_drop.c
@@ -29,7 +29,7 @@ __drop_file(
return (EINVAL);
/* Close all btree handles associated with this file. */
- WT_WITH_HANDLE_LIST_LOCK(session, ret,
+ WT_WITH_HANDLE_LIST_LOCK(session,
ret = __wt_conn_dhandle_close_all(session, uri, force));
WT_RET(ret);
diff --git a/src/schema/schema_rename.c b/src/schema/schema_rename.c
index 4ec126394dd..21402ed9332 100644
--- a/src/schema/schema_rename.c
+++ b/src/schema/schema_rename.c
@@ -30,7 +30,7 @@ __rename_file(
return (EINVAL);
/* Close any btree handles in the file. */
- WT_WITH_HANDLE_LIST_LOCK(session, ret,
+ WT_WITH_HANDLE_LIST_LOCK(session,
ret = __wt_conn_dhandle_close_all(session, uri, false));
WT_ERR(ret);
diff --git a/src/schema/schema_worker.c b/src/schema/schema_worker.c
index a2fe5244c4d..b5ee3bb7f7d 100644
--- a/src/schema/schema_worker.c
+++ b/src/schema/schema_worker.c
@@ -49,7 +49,7 @@ __wt_schema_worker(WT_SESSION_IMPL *session,
* any open file handles, including checkpoints.
*/
if (FLD_ISSET(open_flags, WT_DHANDLE_EXCLUSIVE)) {
- WT_WITH_HANDLE_LIST_LOCK(session, ret,
+ WT_WITH_HANDLE_LIST_LOCK(session,
ret = __wt_conn_dhandle_close_all(
session, uri, false));
WT_ERR(ret);
@@ -63,7 +63,7 @@ __wt_schema_worker(WT_SESSION_IMPL *session,
} else if (ret == EBUSY) {
WT_ASSERT(session, !FLD_ISSET(
open_flags, WT_DHANDLE_EXCLUSIVE));
- WT_WITH_HANDLE_LIST_LOCK(session, ret,
+ WT_WITH_HANDLE_LIST_LOCK(session,
ret = __wt_conn_btree_apply_single_ckpt(
session, uri, file_func, cfg));
}