summaryrefslogtreecommitdiff
path: root/bench
diff options
context:
space:
mode:
authorAlex Gorrod <alexg@wiredtiger.com>2014-06-12 11:32:24 +1000
committerAlex Gorrod <alexg@wiredtiger.com>2014-06-12 11:32:24 +1000
commitabb6041efa982dff0ce929835c77ddb7bd097994 (patch)
tree26f7a4a05b6e16db66b2414acee7c7b0a4b7038d /bench
parent83eda6c1f91dda799d707e1286b634224d826ff4 (diff)
downloadmongo-abb6041efa982dff0ce929835c77ddb7bd097994.tar.gz
Fix a race in the populate phase of wtperf with multiple threads.
Diffstat (limited to 'bench')
-rw-r--r--bench/wtperf/wtperf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bench/wtperf/wtperf.c b/bench/wtperf/wtperf.c
index 82d4cb1ad6e..035c120b541 100644
--- a/bench/wtperf/wtperf.c
+++ b/bench/wtperf/wtperf.c
@@ -1206,6 +1206,8 @@ execute_populate(CONFIG *cfg)
" populate thread(s) for %" PRIu32 " items",
cfg->populate_threads, cfg->icount);
+ cfg->insert_key = 0;
+
if ((cfg->popthreads =
calloc(cfg->populate_threads, sizeof(CONFIG_THREAD))) == NULL)
return (enomem(cfg));
@@ -1219,8 +1221,6 @@ execute_populate(CONFIG *cfg)
cfg->popthreads, cfg->populate_threads, pfunc)) != 0)
return (ret);
- cfg->insert_key = 0;
-
if ((ret = __wt_epoch(NULL, &start)) != 0) {
lprintf(cfg, ret, 0, "Get time failed in populate.");
return (ret);