summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2015-02-17 21:47:57 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2015-02-17 21:47:57 +1100
commit748e7b0c58b358b14340bacae41f9c46f3c06f7e (patch)
treeae053aff6e618041fde9fe0093c3c45ed265d100
parenta9de0f7ac8ad373d7aef6a480c69a2a7e0b55c59 (diff)
downloadmongo-748e7b0c58b358b14340bacae41f9c46f3c06f7e.tar.gz
Skip hot pages during write leaves: checkpoint will have to visit them anyway.
-rw-r--r--src/btree/bt_sync.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/btree/bt_sync.c b/src/btree/bt_sync.c
index f038ebf3ecc..7c6d49c8ea0 100644
--- a/src/btree/bt_sync.c
+++ b/src/btree/bt_sync.c
@@ -60,9 +60,14 @@ __sync_file(WT_SESSION_IMPL *session, int syncop)
if (walk == NULL)
break;
- /* Write dirty pages if nobody beat us to it. */
+ /*
+ * Write dirty pages if nobody beat us to it. Don't
+ * try to write the hottest pages: checkpoint will have
+ * to visit them anyway.
+ */
page = walk->page;
- if (__wt_page_is_modified(page)) {
+ if (__wt_page_is_modified(page) &&
+ __wt_txn_visible_all(session, page->modify->update_txn)) {
if (txn->isolation == TXN_ISO_READ_COMMITTED)
__wt_txn_refresh(session, 1);
leaf_bytes += page->memory_footprint;