diff options
author | Keith Bostic <keith@wiredtiger.com> | 2015-06-06 13:23:21 -0400 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2015-06-29 13:52:26 +1000 |
commit | 2fc2b8bbe52b10e87ba898af13ea264018622bd9 (patch) | |
tree | 460c21717115887aa3fa6991efe9c9409d058abd /src/include | |
parent | a0c9c24db632dfed6df03f300375ea2a275898ef (diff) | |
download | mongo-2fc2b8bbe52b10e87ba898af13ea264018622bd9.tar.gz |
WT-1959 Add the "strict" configuration option to WT_SESSION.verify, default false, don't error if we leak blocks unless strict is configured.
(cherry picked from commit b3e3f19a08bbd8897dc0ba3f54b217292e35ea6b)
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/block.h | 4 | ||||
-rw-r--r-- | src/include/extern.h | 2 | ||||
-rw-r--r-- | src/include/wiredtiger.in | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/include/block.h b/src/include/block.h index 4ef1b9da4ec..fb8987efdb4 100644 --- a/src/include/block.h +++ b/src/include/block.h @@ -185,7 +185,8 @@ struct __wt_bm { int (*sync)(WT_BM *, WT_SESSION_IMPL *, int); int (*verify_addr)(WT_BM *, WT_SESSION_IMPL *, const uint8_t *, size_t); int (*verify_end)(WT_BM *, WT_SESSION_IMPL *); - int (*verify_start)(WT_BM *, WT_SESSION_IMPL *, WT_CKPT *); + int (*verify_start) + (WT_BM *, WT_SESSION_IMPL *, WT_CKPT *, const char *[]); int (*write) (WT_BM *, WT_SESSION_IMPL *, WT_ITEM *, uint8_t *, size_t *, int); int (*write_size)(WT_BM *, WT_SESSION_IMPL *, size_t *); @@ -246,6 +247,7 @@ struct __wt_block { /* Verification support */ int verify; /* If performing verification */ + int verify_strict; /* Fail hard on any error */ wt_off_t verify_size; /* Checkpoint's file size */ WT_EXTLIST verify_alloc; /* Verification allocation list */ uint64_t frags; /* Maximum frags in the file */ diff --git a/src/include/extern.h b/src/include/extern.h index 59e795893b5..147af2521f7 100644 --- a/src/include/extern.h +++ b/src/include/extern.h @@ -65,7 +65,7 @@ extern int __wt_block_salvage_end(WT_SESSION_IMPL *session, WT_BLOCK *block); extern int __wt_block_offset_invalid(WT_BLOCK *block, wt_off_t offset, uint32_t size); extern int __wt_block_salvage_next(WT_SESSION_IMPL *session, WT_BLOCK *block, uint8_t *addr, size_t *addr_sizep, int *eofp); extern int __wt_block_salvage_valid(WT_SESSION_IMPL *session, WT_BLOCK *block, uint8_t *addr, size_t addr_size, int valid); -extern int __wt_block_verify_start( WT_SESSION_IMPL *session, WT_BLOCK *block, WT_CKPT *ckptbase); +extern int __wt_block_verify_start(WT_SESSION_IMPL *session, WT_BLOCK *block, WT_CKPT *ckptbase, const char *cfg[]); extern int __wt_block_verify_end(WT_SESSION_IMPL *session, WT_BLOCK *block); extern int __wt_verify_ckpt_load( WT_SESSION_IMPL *session, WT_BLOCK *block, WT_BLOCK_CKPT *ci); extern int __wt_verify_ckpt_unload(WT_SESSION_IMPL *session, WT_BLOCK *block); diff --git a/src/include/wiredtiger.in b/src/include/wiredtiger.in index 3e7f956d885..4804290acba 100644 --- a/src/include/wiredtiger.in +++ b/src/include/wiredtiger.in @@ -1337,6 +1337,10 @@ struct __wt_session { * @config{dump_shape, Display the shape of the tree after * verification\, using the application's message handler\, intended for * debugging., a boolean flag; default \c false.} + * @config{strict, Treat any verification problem as an error; by + * default\, verify will warn\, but not fail\, in the case of errors + * that won't affect future behavior (for example\, a leaked block)., a + * boolean flag; default \c false.} * @configend * @ebusy_errors */ |