summaryrefslogtreecommitdiff
path: root/src/meta
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2013-09-10 21:57:59 -0400
committerKeith Bostic <keith@wiredtiger.com>2013-09-10 21:57:59 -0400
commite6b96537394e098b9edaeb7fad261411530a96c4 (patch)
tree9ff0c7aa37ea5a8f7146dfdc9ada76e40f8e3d2e /src/meta
parent989c969bfce5bdb0c5704cd699c65120ae41a627 (diff)
downloadmongo-e6b96537394e098b9edaeb7fad261411530a96c4.tar.gz
Back out the change to __wt_conn_btree_apply and __wt_meta_btree_apply:
it broke test/fops. It's not required for hot-backups to work, remove it entirely.
Diffstat (limited to 'src/meta')
-rw-r--r--src/meta/meta_apply.c29
1 files changed, 7 insertions, 22 deletions
diff --git a/src/meta/meta_apply.c b/src/meta/meta_apply.c
index 85c98313bed..46e758cc336 100644
--- a/src/meta/meta_apply.c
+++ b/src/meta/meta_apply.c
@@ -31,7 +31,7 @@ __wt_meta_btree_apply(WT_SESSION_IMPL *session,
WT_ERR(cursor->get_key(cursor, &uri));
if (!WT_PREFIX_MATCH(uri, "file:"))
break;
- if (strcmp(uri, WT_METADATA_URI) == 0)
+ else if (strcmp(uri, WT_METADATA_URI) == 0)
continue;
/*
@@ -40,33 +40,18 @@ __wt_meta_btree_apply(WT_SESSION_IMPL *session,
* dropping the handle (e.g in LSM when cleaning up obsolete
* chunks). Holding the metadata lock isn't enough.
*/
- switch (ret =
- __wt_session_get_btree(session, uri, NULL, NULL, 0)) {
- case 0:
+ ret = __wt_session_get_btree(session, uri, NULL, NULL, 0);
+ if (ret == 0) {
ret = func(session, cfg);
if (WT_META_TRACKING(session))
WT_TRET(
__wt_meta_track_handle_lock(session, 0));
else
WT_TRET(__wt_session_release_btree(session));
- WT_ERR(ret);
- break;
- case EBUSY:
- /*
- * We're holding the schema lock, and currently we only
- * see an EBUSY return if there's a bulk-load handle in
- * the list. All of our current callers want the bulk-
- * load handles passed in as well, call a support
- * function to find the handle and pass it along.
- */
- ret = 0;
- WT_ERR(__wt_conn_btree_apply_bulk(
- session, uri, func, cfg));
- break;
- default:
- WT_ERR(ret);
- break;
- }
+ } else if (ret == EBUSY)
+ ret = __wt_conn_btree_apply_single(
+ session, uri, func, cfg);
+ WT_ERR(ret);
}
if (tret != WT_NOTFOUND)