summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2012-10-08 17:14:22 +0000
committerKeith Bostic <keith@wiredtiger.com>2012-10-08 17:14:22 +0000
commit1451b355cbe21a09e6538088a191707f7107d509 (patch)
tree2273c59cfddac831530556e8363faca3c50d62b8
parentb54a160e212bfea8bf036d1906d49a41a3e350e2 (diff)
downloadmongo-1451b355cbe21a09e6538088a191707f7107d509.tar.gz
Don't put checkpoint extent blocks on the available list, blocks on it
are considered for truncation; they have to go on the "checkpoint available" list. #351.
-rw-r--r--src/block/block_ckpt.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/block/block_ckpt.c b/src/block/block_ckpt.c
index 69d5501e44d..bbcb0c39239 100644
--- a/src/block/block_ckpt.c
+++ b/src/block/block_ckpt.c
@@ -236,8 +236,16 @@ __ckpt_extlist_fblocks(
{
if (el->offset == WT_BLOCK_INVALID_OFFSET)
return (0);
+
+ /*
+ * Free blocks used to write checkpoint extents into the live system's
+ * checkpoint avail list (they were never on any alloc list). Do not
+ * use the live systems avail list because that list is used to decide
+ * if the file can be truncated, and we can't truncate any part of the
+ * file that contains previous checkpoint's extents.
+ */
return (__wt_block_insert_ext(
- session, &block->live.avail, el->offset, el->size));
+ session, &block->live.ckpt_avail, el->offset, el->size));
}
/*
@@ -404,9 +412,8 @@ __ckpt_process(
/*
* Free the blocks used to hold the "from" checkpoint's extent
- * lists directly to the live system's avail list, they were
- * never on any alloc list. Include the "from" checkpoint's
- * avail list, it's going away.
+ * lists. Include the "from" checkpoint's avail list, it's
+ * going away.
*/
WT_ERR(__ckpt_extlist_fblocks(session, block, &a->alloc));
WT_ERR(__ckpt_extlist_fblocks(session, block, &a->avail));