diff options
author | Keith Bostic <keith.bostic@mongodb.com> | 2017-03-17 01:15:06 -0400 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2017-03-17 16:15:06 +1100 |
commit | 19fac80017eee9758d8109ab94796231d4995f33 (patch) | |
tree | 1f188870c528f93bf747e46a56459eef035c3753 /src/include | |
parent | 360b43b33170a89587a737988477d0619008ec2a (diff) | |
download | mongo-19fac80017eee9758d8109ab94796231d4995f33.tar.gz |
WT-3224 Prevent splits in LSM primaries (#3335)
Move lsm_primary check near evict_disabled check.
The assertion was caused by `WT_BTREE_NO_RECONCILE`, which allows in-memory splits even when eviction is disabled. Rename that flag `WT_BTREE_ALLOW_SPLITS` for clarity.
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/btree.h | 12 | ||||
-rw-r--r-- | src/include/btree.i | 1 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/include/btree.h b/src/include/btree.h index 15a68474fdf..88312f408cc 100644 --- a/src/include/btree.h +++ b/src/include/btree.h @@ -157,14 +157,14 @@ struct __wt_btree { WT_SPINLOCK flush_lock; /* Lock to flush the tree's pages */ /* Flags values up to 0xff are reserved for WT_DHANDLE_* */ -#define WT_BTREE_BULK 0x000100 /* Bulk-load handle */ -#define WT_BTREE_CLOSED 0x000200 /* Handle closed */ -#define WT_BTREE_IGNORE_CACHE 0x000400 /* Cache-resident object */ -#define WT_BTREE_IN_MEMORY 0x000800 /* Cache-resident object */ -#define WT_BTREE_LOOKASIDE 0x001000 /* Look-aside table */ +#define WT_BTREE_ALLOW_SPLITS 0x000100 /* Allow splits, even with no evict */ +#define WT_BTREE_BULK 0x000200 /* Bulk-load handle */ +#define WT_BTREE_CLOSED 0x000400 /* Handle closed */ +#define WT_BTREE_IGNORE_CACHE 0x000800 /* Cache-resident object */ +#define WT_BTREE_IN_MEMORY 0x001000 /* Cache-resident object */ +#define WT_BTREE_LOOKASIDE 0x002000 /* Look-aside table */ #define WT_BTREE_NO_CHECKPOINT 0x004000 /* Disable checkpoints */ #define WT_BTREE_NO_LOGGING 0x008000 /* Disable logging */ -#define WT_BTREE_NO_RECONCILE 0x010000 /* Allow splits, even with no evict */ #define WT_BTREE_REBALANCE 0x020000 /* Handle is for rebalance */ #define WT_BTREE_SALVAGE 0x040000 /* Handle is for salvage */ #define WT_BTREE_SKIP_CKPT 0x080000 /* Handle skipped checkpoint */ diff --git a/src/include/btree.i b/src/include/btree.i index c0c5c7c5a8d..eefc2db075d 100644 --- a/src/include/btree.i +++ b/src/include/btree.i @@ -1229,7 +1229,6 @@ __wt_leaf_page_can_split(WT_SESSION_IMPL *session, WT_PAGE *page) * data in the last skiplist on the page. Split if there are enough * items and the skiplist does not fit within a single disk page. */ - ins_head = page->type == WT_PAGE_ROW_LEAF ? (page->entries == 0 ? WT_ROW_INSERT_SMALLEST(page) : |