summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2012-11-01 15:52:02 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2012-11-01 15:52:02 +1100
commita5aba41271efa77fcbbc79101dc20768792c25b8 (patch)
tree406bd446dfa1ac9b24ca7004a91247360fa1fd7e
parentac1bd5010626856dc9f17e753915cae38c1d32ab (diff)
downloadmongo-a5aba41271efa77fcbbc79101dc20768792c25b8.tar.gz
LSM: only track cursors on the primary chunk if it is not yet on disk.
-rw-r--r--src/lsm/lsm_cursor.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lsm/lsm_cursor.c b/src/lsm/lsm_cursor.c
index 1f11e3f8bc0..fbbcb3620d8 100644
--- a/src/lsm/lsm_cursor.c
+++ b/src/lsm/lsm_cursor.c
@@ -182,11 +182,8 @@ __clsm_open_cursors(WT_CURSOR_LSM *clsm, int start_chunk)
}
/* The last chunk is our new primary. */
- if ((clsm->primary_chunk = chunk) != NULL) {
- WT_ASSERT(session,
- !F_ISSET(clsm, WT_CLSM_UPDATED) ||
- !F_ISSET(chunk, WT_LSM_CHUNK_ONDISK));
-
+ if (chunk != NULL && !F_ISSET(chunk, WT_LSM_CHUNK_ONDISK)) {
+ clsm->primary_chunk = chunk;
(void)WT_ATOMIC_ADD(clsm->primary_chunk->ncursor, 1);
}