summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/lsm/lsm_tree.c
diff options
context:
space:
mode:
authorAlex Gorrod <alexander.gorrod@mongodb.com>2017-10-03 11:36:35 +1100
committerAlex Gorrod <alexander.gorrod@mongodb.com>2017-10-03 11:36:35 +1100
commita7d8f125b9f7db197d20800802016a671d9949c5 (patch)
tree7084f736abe44c9e57e929d2be08ec28154825de /src/third_party/wiredtiger/src/lsm/lsm_tree.c
parenta7efca41eb8b864f38239a77e2816b24c48fa899 (diff)
downloadmongo-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_tree.c')
-rw-r--r--src/third_party/wiredtiger/src/lsm/lsm_tree.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/third_party/wiredtiger/src/lsm/lsm_tree.c b/src/third_party/wiredtiger/src/lsm/lsm_tree.c
index 3a1165ec239..a42fbbe511b 100644
--- a/src/third_party/wiredtiger/src/lsm/lsm_tree.c
+++ b/src/third_party/wiredtiger/src/lsm/lsm_tree.c
@@ -329,6 +329,7 @@ int
__wt_lsm_tree_create(WT_SESSION_IMPL *session,
const char *uri, bool exclusive, const char *config)
{
+ WT_CONFIG_ITEM cval;
WT_DECL_RET;
WT_LSM_TREE *lsm_tree;
const char *cfg[] =
@@ -345,6 +346,12 @@ __wt_lsm_tree_create(WT_SESSION_IMPL *session,
WT_RET_NOTFOUND_OK(ret);
if (!F_ISSET(S2C(session), WT_CONN_READONLY)) {
+ /* LSM doesn't yet support the 'r' format. */
+ WT_ERR(__wt_config_gets(session, cfg, "key_format", &cval));
+ if (WT_STRING_MATCH("r", cval.str, cval.len))
+ WT_ERR_MSG(session, EINVAL,
+ "LSM trees do not support a key format of 'r'");
+
WT_ERR(__wt_config_merge(session, cfg, NULL, &metadata));
WT_ERR(__wt_metadata_insert(session, uri, metadata));
}
@@ -455,7 +462,7 @@ __lsm_tree_open_check(WT_SESSION_IMPL *session, WT_LSM_TREE *lsm_tree)
"must be at least %" PRIu64 " (%" PRIu64 "MB)",
S2C(session)->cache_size,
S2C(session)->cache_size / WT_MEGABYTE,
- required, required / WT_MEGABYTE);
+ required, (required + (WT_MEGABYTE - 1))/ WT_MEGABYTE);
return (0);
}
@@ -876,8 +883,8 @@ __wt_lsm_tree_drop(
WT_DECL_RET;
WT_LSM_CHUNK *chunk;
WT_LSM_TREE *lsm_tree;
- int tret;
u_int i;
+ int tret;
bool locked;
locked = false;
@@ -933,9 +940,9 @@ __wt_lsm_tree_rename(WT_SESSION_IMPL *session,
WT_DECL_RET;
WT_LSM_CHUNK *chunk;
WT_LSM_TREE *lsm_tree;
- const char *old;
- int tret;
u_int i;
+ int tret;
+ const char *old;
bool locked;
old = NULL;