diff options
author | Keith Bostic <keith@wiredtiger.com> | 2016-02-09 09:40:06 -0500 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2016-02-09 09:40:06 -0500 |
commit | 3afbc3749499312f95c85a8e9e1b3ed44bf4bf93 (patch) | |
tree | ca245741163074468432334a9c9c99e2d639d58b | |
parent | 86b3d2f681862117289c0e8944d5166c84ffa54a (diff) | |
download | mongo-3afbc3749499312f95c85a8e9e1b3ed44bf4bf93.tar.gz |
WT-2361: column-store starting record number error
Insert splits happen concurrently with checkpoints, and checkpoints can
skip the page being split based on its first-dirty transaction value,
but not skip the newly created split page, which corrupts the
checkpoint. Don't let that happen, set the first-dirty transaction value
before splitting.
-rw-r--r-- | src/btree/bt_split.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/btree/bt_split.c b/src/btree/bt_split.c index 68d3cc91eb3..e036d6e3334 100644 --- a/src/btree/bt_split.c +++ b/src/btree/bt_split.c @@ -1944,6 +1944,15 @@ __split_insert(WT_SESSION_IMPL *session, WT_REF *ref) __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 + * insufficient: set the first dirty transaction to an impossibly old + * value so this page is not skipped by a checkpoint. + */ + page->modify->first_dirty_txn = WT_TXN_FIRST; + + /* * The act of splitting into the parent releases the pages for eviction; * ensure the page contents are consistent. */ |