diff options
-rw-r--r-- | src/conn/conn_ckpt.c | 16 | ||||
-rw-r--r-- | src/conn/conn_stat.c | 6 | ||||
-rw-r--r-- | src/conn/conn_sweep.c | 1 |
3 files changed, 11 insertions, 12 deletions
diff --git a/src/conn/conn_ckpt.c b/src/conn/conn_ckpt.c index f38628617dd..6eb134c1765 100644 --- a/src/conn/conn_ckpt.c +++ b/src/conn/conn_ckpt.c @@ -83,6 +83,14 @@ __ckpt_server(void *arg) while (F_ISSET(conn, WT_CONN_SERVER_RUN) && F_ISSET(conn, WT_CONN_SERVER_CHECKPOINT)) { + /* + * Wait... + * NOTE: If the user only configured logsize, then usecs + * will be 0 and this wait won't return until signalled. + */ + WT_ERR( + __wt_cond_wait(session, conn->ckpt_cond, conn->ckpt_usecs)); + /* Checkpoint the database. */ WT_ERR(wt_session->checkpoint(wt_session, conn->ckpt_config)); @@ -99,14 +107,6 @@ __ckpt_server(void *arg) */ WT_ERR(__wt_cond_wait(session, conn->ckpt_cond, 1)); } - - /* - * Wait... - * NOTE: If the user only configured logsize, then usecs - * will be 0 and this wait won't return until signalled. - */ - WT_ERR( - __wt_cond_wait(session, conn->ckpt_cond, conn->ckpt_usecs)); } if (0) { diff --git a/src/conn/conn_stat.c b/src/conn/conn_stat.c index 2d8395c0517..be2172ea8d8 100644 --- a/src/conn/conn_stat.c +++ b/src/conn/conn_stat.c @@ -406,12 +406,12 @@ __statlog_server(void *arg) while (F_ISSET(conn, WT_CONN_SERVER_RUN) && F_ISSET(conn, WT_CONN_SERVER_STATISTICS)) { - if (!FLD_ISSET(conn->stat_flags, WT_CONN_STAT_NONE)) - WT_ERR(__statlog_log_one(session, &path, &tmp)); - /* Wait until the next event. */ WT_ERR( __wt_cond_wait(session, conn->stat_cond, conn->stat_usecs)); + + if (!FLD_ISSET(conn->stat_flags, WT_CONN_STAT_NONE)) + WT_ERR(__statlog_log_one(session, &path, &tmp)); } if (0) { diff --git a/src/conn/conn_sweep.c b/src/conn/conn_sweep.c index a5bd8e1343c..5145583fc7d 100644 --- a/src/conn/conn_sweep.c +++ b/src/conn/conn_sweep.c @@ -118,7 +118,6 @@ __sweep_server(void *arg) */ while (F_ISSET(conn, WT_CONN_SERVER_RUN) && F_ISSET(conn, WT_CONN_SERVER_SWEEP)) { - /* Wait until the next event. */ WT_ERR(__wt_cond_wait(session, conn->sweep_cond, WT_DHANDLE_SWEEP_PERIOD * WT_MILLION)); |