summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2012-09-17 17:01:20 +1000
committerMichael Cahill <michael.cahill@wiredtiger.com>2012-09-17 17:01:20 +1000
commita41e390920d160f0a179d47ec2cf829dcfd64ef4 (patch)
tree1af9fb2f27a8cc6f5e188e3f7fcec806addd273f
parent34fea8b9c188444a9a11e02da5cd79c466cad6bc (diff)
downloadmongo-a41e390920d160f0a179d47ec2cf829dcfd64ef4.tar.gz
In WT_CURSOR::reset for LSM, don't try to open new cursors in chunks: just close any that are open.
-rw-r--r--src/lsm/lsm_cursor.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lsm/lsm_cursor.c b/src/lsm/lsm_cursor.c
index 0a3f7797877..de4bc5950d7 100644
--- a/src/lsm/lsm_cursor.c
+++ b/src/lsm/lsm_cursor.c
@@ -457,14 +457,19 @@ __clsm_reset(WT_CURSOR *cursor)
WT_DECL_RET;
WT_SESSION_IMPL *session;
- WT_LSM_ENTER(clsm, cursor, session, reset);
+ /*
+ * Don't use the normal __clsm_enter path: that is wasted work when all
+ * we want to do is give up our position.
+ */
+ clsm = (WT_CURSOR_LSM *)cursor;
+ CURSOR_API_CALL_NOCONF(cursor, session, reset, NULL);
if ((c = clsm->current) != NULL) {
ret = c->reset(c);
clsm->current = NULL;
}
F_CLR(cursor, WT_CURSTD_KEY_SET | WT_CURSTD_VALUE_SET);
F_CLR(clsm, WT_CLSM_ITERATE_NEXT | WT_CLSM_ITERATE_PREV);
-err: WT_LSM_END(clsm, session);
+ API_END(session);
return (ret);
}