summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2016-02-09 09:55:15 -0500
committerKeith Bostic <keith@wiredtiger.com>2016-02-09 09:55:15 -0500
commit6cc6b78a2071de8600caf28682f84230c8beb34a (patch)
tree558807e5bcbdc2ada2ae22cf3675b626a4d76a4b
parent0f2420492e7ce145114d70af66ae7268d027ae27 (diff)
downloadmongo-6cc6b78a2071de8600caf28682f84230c8beb34a.tar.gz
WT-2361: column-store starting record number error
Move the comment/code for setting the first dirty transaction in the page we're splitting, and the page we're creating, next to each other in the function for clarity.
-rw-r--r--src/btree/bt_split.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/btree/bt_split.c b/src/btree/bt_split.c
index e036d6e3334..3dea03316ce 100644
--- a/src/btree/bt_split.c
+++ b/src/btree/bt_split.c
@@ -1787,8 +1787,8 @@ __split_insert(WT_SESSION_IMPL *session, WT_REF *ref)
type, WT_INSERT_RECNO(moved_ins), 0, false, &right));
/*
- * The new page is dirty by definition, column-store splits update the
- * page-modify structure, so create it now.
+ * The new page is dirty by definition, plus column-store splits update
+ * the page-modify structure, so create it now.
*/
WT_ERR(__wt_page_modify_init(session, right));
__wt_page_modify_set(session, right);
@@ -1829,15 +1829,6 @@ __split_insert(WT_SESSION_IMPL *session, WT_REF *ref)
}
/*
- * We modified the page above, which will have set the first dirty
- * transaction to the last transaction current running. However, the
- * updates we installed may be older than that. Set the first dirty
- * transaction to an impossibly old value so this page is never skipped
- * in a checkpoint.
- */
- right->modify->first_dirty_txn = WT_TXN_FIRST;
-
- /*
* Calculate how much memory we're moving: figure out how deep the skip
* list stack is for the element we are moving, and the memory used by
* the item's list of updates.
@@ -1935,15 +1926,6 @@ __split_insert(WT_SESSION_IMPL *session, WT_REF *ref)
#endif
/*
- * Update the page accounting.
- *
- * XXX
- * If we fail to split the parent, the page's accounting will be wrong.
- */
- __wt_cache_page_inmem_decr(session, page, page_decr);
- __wt_cache_page_inmem_incr(session, right, right_incr);
-
- /*
* We perform insert splits concurrently with checkpoints, where the
* requirement is a checkpoint must include either the original page
* or both new pages. The page we're splitting is dirty, but that's
@@ -1953,6 +1935,24 @@ __split_insert(WT_SESSION_IMPL *session, WT_REF *ref)
page->modify->first_dirty_txn = WT_TXN_FIRST;
/*
+ * We modified the page above, which will have set the first dirty
+ * transaction to the last transaction current running. However, the
+ * updates we installed may be older than that. Set the first dirty
+ * transaction to an impossibly old value so this page is never skipped
+ * in a checkpoint.
+ */
+ right->modify->first_dirty_txn = WT_TXN_FIRST;
+
+ /*
+ * Update the page accounting.
+ *
+ * XXX
+ * If we fail to split the parent, the page's accounting will be wrong.
+ */
+ __wt_cache_page_inmem_decr(session, page, page_decr);
+ __wt_cache_page_inmem_incr(session, right, right_incr);
+
+ /*
* The act of splitting into the parent releases the pages for eviction;
* ensure the page contents are consistent.
*/