diff options
author | Don Anderson <dda@ddanderson.com> | 2015-09-13 21:57:42 -0400 |
---|---|---|
committer | Don Anderson <dda@ddanderson.com> | 2015-09-13 21:57:42 -0400 |
commit | 0225351bb6d937309f0bccb800c46e72e1aa4b82 (patch) | |
tree | 95998c9b83fe07fef1642cc281f814e4f25831f0 /src/include/cursor.i | |
parent | 4c663725867d2f9434298d30883c58a0d96deaa9 (diff) | |
parent | e1d6886824058b333495236b776b10fcd8fb74ae (diff) | |
download | mongo-0225351bb6d937309f0bccb800c46e72e1aa4b82.tar.gz |
Merge branch 'develop' into index-create-lsm3
Diffstat (limited to 'src/include/cursor.i')
-rw-r--r-- | src/include/cursor.i | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/include/cursor.i b/src/include/cursor.i index 9e592ede450..e7fed250251 100644 --- a/src/include/cursor.i +++ b/src/include/cursor.i @@ -32,7 +32,7 @@ __cursor_pos_clear(WT_CURSOR_BTREE *cbt) * and it's a minimal set of things we need to clear. It would be a * lot simpler to clear everything, but we call this function a lot. */ - cbt->recno = 0; + cbt->recno = WT_RECNO_OOB; cbt->ins = NULL; cbt->ins_head = NULL; @@ -150,7 +150,7 @@ __wt_cursor_dhandle_incr_use(WT_SESSION_IMPL *session) dhandle = session->dhandle; /* If we open a handle with a time of death set, clear it. */ - if (WT_ATOMIC_ADD4(dhandle->session_inuse, 1) == 1 && + if (__wt_atomic_addi32(&dhandle->session_inuse, 1) == 1 && dhandle->timeofdeath != 0) dhandle->timeofdeath = 0; } @@ -168,7 +168,7 @@ __wt_cursor_dhandle_decr_use(WT_SESSION_IMPL *session) /* If we close a handle with a time of death set, clear it. */ WT_ASSERT(session, dhandle->session_inuse > 0); - if (WT_ATOMIC_SUB4(dhandle->session_inuse, 1) == 0 && + if (__wt_atomic_subi32(&dhandle->session_inuse, 1) == 0 && dhandle->timeofdeath != 0) dhandle->timeofdeath = 0; } @@ -187,6 +187,12 @@ __cursor_func_init(WT_CURSOR_BTREE *cbt, int reenter) if (reenter) WT_RET(__curfile_leave(cbt)); + /* + * Any old insert position is now invalid. We rely on this being + * cleared to detect if a new skiplist is installed after a search. + */ + cbt->ins_stack[0] = NULL; + /* If the transaction is idle, check that the cache isn't full. */ WT_RET(__wt_txn_idle_cache_check(session)); |