diff options
author | Alex Gorrod <alexander.gorrod@mongodb.com> | 2017-10-03 11:36:35 +1100 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2017-10-03 11:36:35 +1100 |
commit | a7d8f125b9f7db197d20800802016a671d9949c5 (patch) | |
tree | 7084f736abe44c9e57e929d2be08ec28154825de /src/third_party/wiredtiger/src/lsm/lsm_cursor.c | |
parent | a7efca41eb8b864f38239a77e2816b24c48fa899 (diff) | |
download | mongo-a7d8f125b9f7db197d20800802016a671d9949c5.tar.gz |
Import wiredtiger: 6f561957cb5606f504f9fe5a124c80386b210b1a from branch mongodb-3.6
ref: e2c927fa58..6f561957cb
for: 3.5.14
WT-3230 automatic style checking: function local variable declarations
WT-3252 Remove the reconciliation WT_BOUNDARY structure.
WT-3430 Add statistics tracking transaction ID/timestamp queue usage
WT-3437 Evaluate improvements to tuning of number of eviction workers
WT-3449 Get the Helium software running again.
WT-3457 Enhance checkpoint scrub algorithm
WT-3468 Ensure time comparison is done in thread-safe manner
WT-3474 Extend Python timestamp rollback test case
WT-3510 Add tests to check different sized timestamps and timestamps turned off
WT-3511 Add test for timestamp changing partway during a multi-step transaction
WT-3512 Add tests to catch improper usage of timestamp API
WT-3524 Test format likely to pin cache full when enabling timestamps
WT-3533 eviction handle walk can race with handle re-open
WT-3537 Split pages when nothing can be written
WT-3543 Ensure that failed checkpoints cleanup properly
WT-3555 Streamline open cursor for tables
WT-3556 remove wtstats support from WiredTiger
WT-3557 Make test/format ignore unknown keywords
WT-3561 test/recovery hangs with timestamps disabled
WT-3571 clsm_open_cursors() set incorrct chunk->count
WT-3572 format should limit runs to 6 hours.
WT-3574 timestamp abort does not need to increment with atomic op
WT-3575 ASCII statistics log printing
WT-3576 Update test_timestamp09 to use integer comparison of timestamps
WT-3578 Failed to parse oldest timestamp '0': zero not permitted
WT-3581 format: unexpected checkpoint resolution
WT-3588 test/format references freed memory.
WT-3589 replace return checks and testutil_die() pairs, with testutil_check().
WT-3590 Keep data consistent if writes fail during a clean shutdown
WT-3595 Make sure the Python example gets the right _wiredtiger.so
WT-3601 Coverity 1381365: bt_split.c:__split_ref_move() resource leak
WT-3602 compatible=(release=2.9) is insufficient for downgrading to 2.9
WT-3603 format threads always traverse the same RNG space.
WT-3605 LSM doesn't support type 'r'
WT-3606 reconfigure compatibility error paths leave system in modified state
WT-3609 Coverity 1381438: change __wt_panic to handle a NULL session argument
WT-3610 Relax commit timestamp ordering check
WT-3614 Full-build Friday lint
Diffstat (limited to 'src/third_party/wiredtiger/src/lsm/lsm_cursor.c')
-rw-r--r-- | src/third_party/wiredtiger/src/lsm/lsm_cursor.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/third_party/wiredtiger/src/lsm/lsm_cursor.c b/src/third_party/wiredtiger/src/lsm/lsm_cursor.c index 39656c17ee0..e3b2b50ad28 100644 --- a/src/third_party/wiredtiger/src/lsm/lsm_cursor.c +++ b/src/third_party/wiredtiger/src/lsm/lsm_cursor.c @@ -446,10 +446,10 @@ __clsm_open_cursors( WT_LSM_TREE *lsm_tree; WT_SESSION_IMPL *session; WT_TXN *txn; - const char *checkpoint, *ckpt_cfg[3]; uint64_t saved_gen; - u_int i, nchunks, ngood, nupdates; u_int close_range_end, close_range_start; + u_int i, nchunks, ngood, nupdates; + const char *checkpoint, *ckpt_cfg[3]; bool locked; c = &clsm->iface; @@ -514,8 +514,6 @@ retry: if (F_ISSET(clsm, WT_CLSM_MERGE)) { /* We have to find the start chunk: merge locked it. */ WT_ASSERT(session, start_chunk < lsm_tree->nchunks); } - - WT_ASSERT(session, start_chunk + nchunks <= lsm_tree->nchunks); } else { nchunks = lsm_tree->nchunks; WT_ERR(__clsm_resize_chunks(session, clsm, nchunks)); @@ -618,6 +616,7 @@ retry: if (F_ISSET(clsm, WT_CLSM_MERGE)) { clsm->current = NULL; } + WT_ASSERT(session, start_chunk + nchunks <= lsm_tree->nchunks); clsm->nchunks = nchunks; /* Open the cursors for chunks that have changed. */ @@ -671,9 +670,10 @@ retry: if (F_ISSET(clsm, WT_CLSM_MERGE)) { WT_CURSTD_OVERWRITE | WT_CURSTD_RAW); } - /* Setup the count values for each chunk in the chunks*/ + /* Setup the count values for each chunk in the chunks */ for (i = 0; i != clsm->nchunks; i++) - clsm->chunks[i]->count = lsm_tree->chunk[i]->count; + clsm->chunks[i]->count = + lsm_tree->chunk[i + start_chunk]->count; /* The last chunk is our new primary. */ if (chunk != NULL && @@ -777,8 +777,8 @@ __clsm_get_current(WT_SESSION_IMPL *session, WT_CURSOR_LSM *clsm, bool smallest, bool *deletedp) { WT_CURSOR *c, *current; - int cmp; u_int i; + int cmp; bool multiple; current = NULL; @@ -859,8 +859,8 @@ err: API_END_RET(session, ret); static int __clsm_next(WT_CURSOR *cursor) { - WT_CURSOR_LSM *clsm; WT_CURSOR *c; + WT_CURSOR_LSM *clsm; WT_DECL_RET; WT_SESSION_IMPL *session; u_int i; @@ -985,8 +985,8 @@ __clsm_random_chunk(WT_SESSION_IMPL *session, static int __clsm_next_random(WT_CURSOR *cursor) { - WT_CURSOR_LSM *clsm; WT_CURSOR *c; + WT_CURSOR_LSM *clsm; WT_DECL_RET; WT_SESSION_IMPL *session; int exact; @@ -1037,8 +1037,8 @@ err: F_CLR(cursor, WT_CURSTD_KEY_INT | WT_CURSTD_VALUE_INT); static int __clsm_prev(WT_CURSOR *cursor) { - WT_CURSOR_LSM *clsm; WT_CURSOR *c; + WT_CURSOR_LSM *clsm; WT_DECL_RET; WT_SESSION_IMPL *session; u_int i; |