Skip to content

Commit

Permalink
Merge pull request #2070 from wiredtiger/verify-no-panic
Browse files Browse the repository at this point in the history
WT-2002 If a file is corrupted, verify should not panic.
  • Loading branch information
keithbostic committed Jul 17, 2015
2 parents d0aa5ca + ec847df commit 8af8b8a
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 74 deletions.
11 changes: 6 additions & 5 deletions src/block/block_ckpt.c
Expand Up @@ -315,7 +315,7 @@ __ckpt_extlist_fblocks(
* file that contains a previous checkpoint's extents.
*/
return (__wt_block_insert_ext(
session, &block->live.ckpt_avail, el->offset, el->size));
session, block, &block->live.ckpt_avail, el->offset, el->size));
}

#ifdef HAVE_DIAGNOSTIC
Expand Down Expand Up @@ -537,7 +537,7 @@ __ckpt_process(WT_SESSION_IMPL *session, WT_BLOCK *block, WT_CKPT *ckptbase)
* must be paired in the checkpoint.
*/
if (a->root_offset != WT_BLOCK_INVALID_OFFSET)
WT_ERR(__wt_block_insert_ext(session,
WT_ERR(__wt_block_insert_ext(session, block,
&a->discard, a->root_offset, a->root_size));

/*
Expand All @@ -554,10 +554,10 @@ __ckpt_process(WT_SESSION_IMPL *session, WT_BLOCK *block, WT_CKPT *ckptbase)
*/
if (a->alloc.entries != 0)
WT_ERR(__wt_block_extlist_merge(
session, &a->alloc, &b->alloc));
session, block, &a->alloc, &b->alloc));
if (a->discard.entries != 0)
WT_ERR(__wt_block_extlist_merge(
session, &a->discard, &b->discard));
session, block, &a->discard, &b->discard));

/*
* If the "to" checkpoint is also being deleted, we're done with
Expand Down Expand Up @@ -775,7 +775,8 @@ __wt_block_checkpoint_resolve(WT_SESSION_IMPL *session, WT_BLOCK *block)
block->ckpt_inprogress = 0;

__wt_spin_lock(session, &block->live_lock);
ret = __wt_block_extlist_merge(session, &ci->ckpt_avail, &ci->avail);
ret = __wt_block_extlist_merge(
session, block, &ci->ckpt_avail, &ci->avail);
__wt_spin_unlock(session, &block->live_lock);

/* Discard the lists remaining after the checkpoint call. */
Expand Down

0 comments on commit 8af8b8a

Please sign in to comment.