diff options
author | Alex Gorrod <alexg@wiredtiger.com> | 2013-09-04 00:51:06 +0000 |
---|---|---|
committer | Alex Gorrod <alexg@wiredtiger.com> | 2013-09-04 00:51:06 +0000 |
commit | d46eaf6863ceab02cf5433a029b34fac544347ef (patch) | |
tree | b296b3724465510043040ccf8c3a1e4b7dfda65a /src/btree/rec_split.c | |
parent | 45d3c5145a989a8bb12eec3973340527ef96b9c3 (diff) | |
download | mongo-d46eaf6863ceab02cf5433a029b34fac544347ef.tar.gz |
Fix page size tracking for in memory split merge pages.
Diffstat (limited to 'src/btree/rec_split.c')
-rw-r--r-- | src/btree/rec_split.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/btree/rec_split.c b/src/btree/rec_split.c index 5f36d00461f..666d93adb74 100644 --- a/src/btree/rec_split.c +++ b/src/btree/rec_split.c @@ -27,6 +27,7 @@ __split_row_page_inmem(WT_SESSION_IMPL *session, WT_PAGE *orig) WT_ITEM key; WT_PAGE *new_parent, *right_child; WT_REF *newref; + WT_UPDATE *next_upd; int i, ins_depth; size_t transfer_size; @@ -141,8 +142,11 @@ __split_row_page_inmem(WT_SESSION_IMPL *session, WT_PAGE *orig) * updating the original page. */ transfer_size = - sizeof(WT_INSERT) + ((size_t)ins_depth * sizeof(WT_INSERT *)) + - WT_INSERT_KEY_SIZE(ins); + ((size_t)(ins_depth - 1) * sizeof(WT_INSERT *)) + + sizeof(WT_INSERT) + WT_INSERT_KEY_SIZE(ins) + ins->upd->size; + for (next_upd = ins->upd->next; + next_upd != NULL; next_upd = next_upd->next) + transfer_size += next_upd->size; __wt_cache_page_inmem_incr(session, right_child, transfer_size); __wt_cache_page_inmem_decr(session, orig, transfer_size); |