diff options
Diffstat (limited to 'src/session')
-rw-r--r-- | src/session/session_api.c | 15 | ||||
-rw-r--r-- | src/session/session_compact.c | 9 | ||||
-rw-r--r-- | src/session/session_dhandle.c | 11 |
3 files changed, 16 insertions, 19 deletions
diff --git a/src/session/session_api.c b/src/session/session_api.c index 0d3fcad3184..d3432c19ef3 100644 --- a/src/session/session_api.c +++ b/src/session/session_api.c @@ -68,9 +68,10 @@ __wt_session_copy_values(WT_SESSION_IMPL *session) * unless the cursor is reading from a checkpoint. */ WT_TXN_STATE *txn_state = WT_SESSION_TXN_STATE(session); - WT_ASSERT(session, txn_state->snap_min != WT_TXN_NONE || - (WT_PREFIX_MATCH(cursor->uri, "file:") && - F_ISSET((WT_CURSOR_BTREE *)cursor, WT_CBT_NO_TXN))); + WT_ASSERT(session, + txn_state->pinned_id != WT_TXN_NONE || + (WT_PREFIX_MATCH(cursor->uri, "file:") && + F_ISSET((WT_CURSOR_BTREE *)cursor, WT_CBT_NO_TXN))); #endif F_CLR(cursor, WT_CURSTD_VALUE_INT); @@ -1417,10 +1418,10 @@ __session_transaction_pinned_range(WT_SESSION *wt_session, uint64_t *prange) /* Assign pinned to the lesser of id or snap_min */ if (txn_state->id != WT_TXN_NONE && - WT_TXNID_LT(txn_state->id, txn_state->snap_min)) + WT_TXNID_LT(txn_state->id, txn_state->pinned_id)) pinned = txn_state->id; else - pinned = txn_state->snap_min; + pinned = txn_state->pinned_id; if (pinned == WT_TXN_NONE) *prange = 0; @@ -1494,14 +1495,14 @@ __session_transaction_sync(WT_SESSION *wt_session, const char *config) if (timeout_ms == 0) WT_ERR(ETIMEDOUT); - WT_ERR(__wt_epoch(session, &start)); + __wt_epoch(session, &start); /* * Keep checking the LSNs until we find it is stable or we reach * our timeout. */ while (__wt_log_cmp(&session->bg_sync_lsn, &log->sync_lsn) > 0) { __wt_cond_signal(session, conn->log_file_cond); - WT_ERR(__wt_epoch(session, &now)); + __wt_epoch(session, &now); waited_ms = WT_TIMEDIFF_MS(now, start); if (forever || waited_ms < timeout_ms) /* diff --git a/src/session/session_compact.c b/src/session/session_compact.c index f03d5d34bac..66635007723 100644 --- a/src/session/session_compact.c +++ b/src/session/session_compact.c @@ -179,17 +179,16 @@ __compact_handle_append(WT_SESSION_IMPL *session, const char *cfg[]) * Check if the timeout has been exceeded. */ static int -__session_compact_check_timeout( - WT_SESSION_IMPL *session, struct timespec begin) +__session_compact_check_timeout(WT_SESSION_IMPL *session, struct timespec begin) { struct timespec end; if (session->compact->max_time == 0) return (0); - WT_RET(__wt_epoch(session, &end)); + __wt_epoch(session, &end); if (session->compact->max_time < WT_TIMEDIFF_SEC(end, begin)) - WT_RET(ETIMEDOUT); + return (ETIMEDOUT); return (0); } @@ -219,7 +218,7 @@ __compact_file(WT_SESSION_IMPL *session, const char *cfg[]) session, t, "target=(\"%s\"),force=1", dhandle->name)); checkpoint_cfg[1] = t->data; - WT_ERR(__wt_epoch(session, &start_time)); + __wt_epoch(session, &start_time); /* * We compact 10% of the file on each pass (but the overall size of the diff --git a/src/session/session_dhandle.c b/src/session/session_dhandle.c index e76407567bc..725854c6001 100644 --- a/src/session/session_dhandle.c +++ b/src/session/session_dhandle.c @@ -8,8 +8,6 @@ #include "wt_internal.h" -static int __session_dhandle_sweep(WT_SESSION_IMPL *); - /* * __session_add_dhandle -- * Add a handle to the session's cache. @@ -371,7 +369,7 @@ __wt_session_close_cache(WT_SESSION_IMPL *session) * __session_dhandle_sweep -- * Discard any session dhandles that are not open. */ -static int +static void __session_dhandle_sweep(WT_SESSION_IMPL *session) { WT_CONNECTION_IMPL *conn; @@ -385,9 +383,9 @@ __session_dhandle_sweep(WT_SESSION_IMPL *session) * Periodically sweep for dead handles; if we've swept recently, don't * do it again. */ - WT_RET(__wt_seconds(session, &now)); + __wt_seconds(session, &now); if (difftime(now, session->last_sweep) < conn->sweep_interval) - return (0); + return; session->last_sweep = now; WT_STAT_CONN_INCR(session, dh_session_sweeps); @@ -408,7 +406,6 @@ __session_dhandle_sweep(WT_SESSION_IMPL *session) } dhandle_cache = dhandle_cache_next; } - return (0); } /* @@ -446,7 +443,7 @@ __session_get_dhandle( } /* Sweep the handle list to remove any dead handles. */ - WT_RET(__session_dhandle_sweep(session)); + __session_dhandle_sweep(session); /* * We didn't find a match in the session cache, search the shared |