summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2015-06-20 12:19:56 -0400
committerMichael Cahill <michael.cahill@mongodb.com>2015-06-29 14:06:26 +1000
commit05ade827a2427806ba1c111644538213805f9d92 (patch)
tree8bf126cd1391eb6ed2aff2d1bb4f6d71d1fcc4a5
parent28c395baf4be3cdceb398fea80eb8f7b7513759c (diff)
downloadmongo-05ade827a2427806ba1c111644538213805f9d92.tar.gz
WT-1969 allow the root page to deepen regardless of how pages split.
(cherry picked from commit caa895321adb5df5e7a94763935ba9f6013185e6)
-rw-r--r--src/btree/bt_split.c16
-rw-r--r--src/include/btmem.h7
2 files changed, 5 insertions, 18 deletions
diff --git a/src/btree/bt_split.c b/src/btree/bt_split.c
index f5c3d5fa331..c5b67a717b6 100644
--- a/src/btree/bt_split.c
+++ b/src/btree/bt_split.c
@@ -1028,20 +1028,8 @@ __split_parent(WT_SESSION_IMPL *session, WT_REF *ref,
* are holding it locked.
*/
if (ret == 0 && !exclusive &&
- !F_ISSET_ATOMIC(parent, WT_PAGE_REFUSE_DEEPEN) &&
- __split_should_deepen(session, parent_ref, &children)) {
- /*
- * XXX
- * Temporary hack to avoid a bug where the root page is split
- * even when it's no longer doing any good.
- */
- uint64_t __a, __b;
- __a = parent->memory_footprint;
- ret = __split_deepen(session, parent, children);
- __b = parent->memory_footprint;
- if (__b * 2 >= __a)
- F_SET_ATOMIC(parent, WT_PAGE_REFUSE_DEEPEN);
- }
+ __split_should_deepen(session, parent_ref))
+ ret = __split_deepen(session, parent);
err: if (!complete)
for (i = 0; i < parent_entries; ++i) {
diff --git a/src/include/btmem.h b/src/include/btmem.h
index 303162fcc93..77ad31fc3f6 100644
--- a/src/include/btmem.h
+++ b/src/include/btmem.h
@@ -534,10 +534,9 @@ struct __wt_page {
#define WT_PAGE_DISK_ALLOC 0x02 /* Disk image in allocated memory */
#define WT_PAGE_DISK_MAPPED 0x04 /* Disk image in mapped memory */
#define WT_PAGE_EVICT_LRU 0x08 /* Page is on the LRU queue */
-#define WT_PAGE_REFUSE_DEEPEN 0x10 /* Don't deepen the tree at this page */
-#define WT_PAGE_SCANNING 0x20 /* Obsolete updates are being scanned */
-#define WT_PAGE_SPLIT_INSERT 0x40 /* A leaf page was split for append */
-#define WT_PAGE_SPLITTING 0x80 /* An internal page is growing */
+#define WT_PAGE_SCANNING 0x10 /* Obsolete updates are being scanned */
+#define WT_PAGE_SPLIT_INSERT 0x20 /* A leaf page was split for append */
+#define WT_PAGE_SPLITTING 0x40 /* An internal page is growing */
uint8_t flags_atomic; /* Atomic flags, use F_*_ATOMIC */
/*