summaryrefslogtreecommitdiff
path: root/src/reconcile
diff options
context:
space:
mode:
authorSulabh Mahajan <sulabh.mahajan@mongodb.com>2016-10-06 17:42:53 +1100
committerAlex Gorrod <alexander.gorrod@mongodb.com>2016-10-06 17:42:53 +1100
commit4aa57e5ed1b0ada49c47be325b83f21c2e5fb56a (patch)
tree8565d6a0fa3e7238bb7006c070d16ea8cbba4c1b /src/reconcile
parent5404417a941f40e18180b59fa86ac098b0a556f5 (diff)
downloadmongo-4aa57e5ed1b0ada49c47be325b83f21c2e5fb56a.tar.gz
WT-2831 Skip checkpointing if there have been no modifications (#3067)
This saves locking and scanning the list of active handles for read-only workloads, which can be time consuming when there are many tables.
Diffstat (limited to 'src/reconcile')
-rw-r--r--src/reconcile/rec_write.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/reconcile/rec_write.c b/src/reconcile/rec_write.c
index 16858729c74..09c5879acf8 100644
--- a/src/reconcile/rec_write.c
+++ b/src/reconcile/rec_write.c
@@ -564,10 +564,12 @@ __rec_write_status(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_PAGE *page)
* barrier after the change for clarity (the requirement is the
* flag be set before a subsequent checkpoint reads it, and
* as the current checkpoint is waiting on this reconciliation
- * to complete, there's no risk of that happening)
+ * to complete, there's no risk of that happening).
*/
- btree->modified = 1;
+ btree->modified = true;
WT_FULL_BARRIER();
+ if (!S2C(session)->modified)
+ S2C(session)->modified = true;
/*
* Eviction should only be here if following the save/restore