summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/block
diff options
context:
space:
mode:
authorAlex Gorrod <alexander.gorrod@mongodb.com>2016-10-24 15:26:37 +1100
committerAlex Gorrod <alexander.gorrod@mongodb.com>2016-10-24 15:28:10 +1100
commit0609d0ce2ef563d7a4cde77d46396fe5c92c6df1 (patch)
tree1fc47f23e3cfd91c91182468dce8fee02082b49b /src/third_party/wiredtiger/src/block
parentab1ee41ecf1c96ae8b17a2b1da1c7ee9b8c58676 (diff)
downloadmongo-0609d0ce2ef563d7a4cde77d46396fe5c92c6df1.tar.gz
Import wiredtiger: ef9a7983ea47cea78400a4472a3d4e46735385c5 from branch mongodb-3.4
ref: 6a31c2118c..ef9a7983ea for: 3.4.0-rc2 WT-1592 Add ability to dump detailed cache information via statistics WT-2403 Enhance random cursor implementation for LSM trees WT-2880 Add support for Zstandard compression WT-2904 Fix a bug where the reported checkpoint size could be many times data size WT-2949 Add an option to wtperf to not close connection on shutdown WT-2954 Inserting multi-megabyte values can cause large in-memory pages WT-2955 Add statistics tracking the amount of time threads spend waiting for high level locks WT-2956 utility tests -h option is always overridden by the default setup WT-2959 Ensure WT_SESSION_IMPL is never used before it's initialized WT-2963 Race setting max_entries during eviction WT-2965 test_wt2323_join_visibility can hang on OSX WT-2974 lint WT-2976 Add a statistic tracking how long application threads spend doing I/O WT-2977 Csuite LSM Random test can occasionally fail WT-2985 Race during checkpoint can cause a core dump WT-2987 Fix a bug where opening a cursor on an incomplete table drops core WT-2988 Fix a bug where __wt_epoch potentially returns garbage values.
Diffstat (limited to 'src/third_party/wiredtiger/src/block')
-rw-r--r--src/third_party/wiredtiger/src/block/block_ckpt.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/src/third_party/wiredtiger/src/block/block_ckpt.c b/src/third_party/wiredtiger/src/block/block_ckpt.c
index b7ac953cdb1..48522768dc9 100644
--- a/src/third_party/wiredtiger/src/block/block_ckpt.c
+++ b/src/third_party/wiredtiger/src/block/block_ckpt.c
@@ -615,8 +615,6 @@ live_update:
WT_CKPT_FOREACH(ckptbase, ckpt)
if (F_ISSET(ckpt, WT_CKPT_ADD)) {
/*
- * Set the checkpoint size for the live system.
- *
* !!!
* Our caller wants the final checkpoint size. Setting
* the size here violates layering, but the alternative
@@ -624,7 +622,31 @@ live_update:
* cookie into its components, and that's a fair amount
* of work.
*/
- ckpt->ckpt_size = ci->ckpt_size = ckpt_size;
+ ckpt->ckpt_size = ckpt_size;
+
+ /*
+ * Set the rolling checkpoint size for the live system.
+ * The current size includes the current checkpoint's
+ * root page size (root pages are on the checkpoint's
+ * block allocation list as root pages are allocated
+ * with the usual block allocation functions). That's
+ * correct, but we don't want to include it in the size
+ * for the next checkpoint.
+ */
+ ckpt_size -= ci->root_size;
+
+ /*
+ * Additionally, we had a bug for awhile where the live
+ * checkpoint size grew without bound. We can't sanity
+ * check the value, that would require walking the tree
+ * as part of the checkpoint. Bound any bug at the size
+ * of the file.
+ * It isn't practical to assert that the value is within
+ * bounds since databases created with older versions
+ * of WiredTiger (2.8.0) would likely see an error.
+ */
+ ci->ckpt_size =
+ WT_MIN(ckpt_size, (uint64_t)block->size);
WT_ERR(__ckpt_update(session, block, ckpt, ci, true));
}