diff options
author | Keith Bostic <keith@wiredtiger.com> | 2016-04-21 10:59:23 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2016-04-21 10:59:23 -0400 |
commit | 9288c0831640005c6c5f5f240edaae4bf63878ed (patch) | |
tree | 90da68e8137bb1a4a0037fc46a6a7eb35e02d611 /test | |
parent | 4544a68228394f2840ee99beb48dab64b7f3fc42 (diff) | |
download | mongo-9288c0831640005c6c5f5f240edaae4bf63878ed.tar.gz |
WT-2572: recovery tests require logging, must turn off in-memory configuration
A more general fix -- don't configure in-memory at all, if there's a
specific configuration of an incompatble feature, like logging.
Diffstat (limited to 'test')
-rw-r--r-- | test/format/config.c | 45 | ||||
-rw-r--r-- | test/format/recover.sh | 2 |
2 files changed, 38 insertions, 9 deletions
diff --git a/test/format/config.c b/test/format/config.c index 37f7806e5da..3c02669721d 100644 --- a/test/format/config.c +++ b/test/format/config.c @@ -35,6 +35,7 @@ static void config_encryption(void); static const char *config_file_type(u_int); static CONFIG *config_find(const char *, size_t); static void config_in_memory(void); +static void config_in_memory_check(void); static int config_is_perm(const char *); static void config_isolation(void); static void config_lrt(void); @@ -56,12 +57,8 @@ config_setup(void) /* Clear any temporary values. */ config_clear(); - /* - * Periodically run in-memory. Do in-memory configuration first before - * anything else, it has many related requirements. - */ - if (!config_is_perm("in_memory") && mmrand(NULL, 1, 20) == 1) - g.c_in_memory = 1; + /* Periodically run in-memory. */ + config_in_memory(); /* * Choose a data source type and a file type: they're interrelated (LSM @@ -187,7 +184,7 @@ config_setup(void) g.c_cache = g.c_threads; /* Give in-memory configuration a final review. */ - config_in_memory(); + config_in_memory_check(); /* Make the default maximum-run length 20 minutes. */ if (!config_is_perm("timer")) @@ -331,11 +328,43 @@ config_encryption(void) /* * config_in_memory -- - * In-memory configuration. + * Periodically set up an in-memory configuration. */ static void config_in_memory(void) { + /* + * Configure in-memory before configuring anything else, in-memory has + * many related requirements. Don't configure in-memory if there's any + * incompatible configurations, so we don't have to configure in-memory + * every time we configure something like LSM, that's too painful. + */ + if (config_is_perm("backups")) + return; + if (config_is_perm("checkpoints")) + return; + if (config_is_perm("compression")) + return; + if (config_is_perm("logging")) + return; + if (config_is_perm("rebalance")) + return; + if (config_is_perm("salvage")) + return; + if (config_is_perm("verify")) + return; + + if (!config_is_perm("in_memory") && mmrand(NULL, 1, 20) == 1) + g.c_in_memory = 1; +} + +/* + * config_in_memory_check -- + * In-memory configuration review. + */ +static void +config_in_memory_check(void) +{ size_t cache; if (g.c_in_memory == 0) diff --git a/test/format/recover.sh b/test/format/recover.sh index e5ec5f9638d..4177e26a278 100644 --- a/test/format/recover.sh +++ b/test/format/recover.sh @@ -32,7 +32,7 @@ while true; do fi rm -rf $rundir2 - $tcmd $config -q abort=1 in_memory=0 logging=1 timer=$timer + $tcmd $config -q abort=1 logging=1 timer=$timer # Save a copy of the database directory exactly as it was at the crash. cp -rp RUNDIR $rundir2 |