From 4aa57e5ed1b0ada49c47be325b83f21c2e5fb56a Mon Sep 17 00:00:00 2001 From: Sulabh Mahajan Date: Thu, 6 Oct 2016 17:42:53 +1100 Subject: 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. --- src/reconcile/rec_write.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/reconcile') 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 -- cgit v1.2.1