summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/session
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/src/session')
-rw-r--r--src/third_party/wiredtiger/src/session/session_api.c9
-rw-r--r--src/third_party/wiredtiger/src/session/session_dhandle.c28
2 files changed, 17 insertions, 20 deletions
diff --git a/src/third_party/wiredtiger/src/session/session_api.c b/src/third_party/wiredtiger/src/session/session_api.c
index 0072d7e1445..82ce934c250 100644
--- a/src/third_party/wiredtiger/src/session/session_api.c
+++ b/src/third_party/wiredtiger/src/session/session_api.c
@@ -1500,7 +1500,7 @@ __session_transaction_sync(WT_SESSION *wt_session, const char *config)
* our timeout.
*/
while (__wt_log_cmp(&session->bg_sync_lsn, &log->sync_lsn) > 0) {
- WT_ERR(__wt_cond_signal(session, conn->log_file_cond));
+ __wt_cond_signal(session, conn->log_file_cond);
WT_ERR(__wt_epoch(session, &now));
waited_ms = WT_TIMEDIFF_MS(now, start);
if (forever || waited_ms < timeout_ms)
@@ -1511,8 +1511,7 @@ __session_transaction_sync(WT_SESSION *wt_session, const char *config)
* computing the wait time in msecs and passing that
* in, unchanged, as the usecs to wait).
*/
- WT_ERR(__wt_cond_wait(
- session, log->log_sync_cond, waited_ms));
+ __wt_cond_wait(session, log->log_sync_cond, waited_ms);
else
WT_ERR(ETIMEDOUT);
}
@@ -1627,7 +1626,7 @@ __session_snapshot(WT_SESSION *wt_session, const char *config)
WT_ERR(__wt_txn_named_snapshot_config(
session, cfg, &has_create, &has_drop));
- WT_ERR(__wt_writelock(session, txn_global->nsnap_rwlock));
+ __wt_writelock(session, txn_global->nsnap_rwlock);
/* Drop any snapshots to be removed first. */
if (has_drop)
@@ -1637,7 +1636,7 @@ __session_snapshot(WT_SESSION *wt_session, const char *config)
if (has_create)
WT_ERR(__wt_txn_named_snapshot_begin(session, cfg));
-err: WT_TRET(__wt_writeunlock(session, txn_global->nsnap_rwlock));
+err: __wt_writeunlock(session, txn_global->nsnap_rwlock);
API_END_RET_NOTFOUND_MAP(session, ret);
}
diff --git a/src/third_party/wiredtiger/src/session/session_dhandle.c b/src/third_party/wiredtiger/src/session/session_dhandle.c
index ddf4d3dfa33..a899bad1b1f 100644
--- a/src/third_party/wiredtiger/src/session/session_dhandle.c
+++ b/src/third_party/wiredtiger/src/session/session_dhandle.c
@@ -183,17 +183,17 @@ __wt_session_lock_dhandle(
*/
if (F_ISSET(dhandle, WT_DHANDLE_OPEN) &&
(!want_exclusive || lock_busy)) {
- WT_RET(__wt_readlock(session, dhandle->rwlock));
+ __wt_readlock(session, dhandle->rwlock);
if (F_ISSET(dhandle, WT_DHANDLE_DEAD)) {
*is_deadp = 1;
- return (
- __wt_readunlock(session, dhandle->rwlock));
+ __wt_readunlock(session, dhandle->rwlock);
+ return (0);
}
is_open = F_ISSET(dhandle, WT_DHANDLE_OPEN);
if (is_open && !want_exclusive)
return (0);
- WT_RET(__wt_readunlock(session, dhandle->rwlock));
+ __wt_readunlock(session, dhandle->rwlock);
} else
is_open = false;
@@ -206,8 +206,8 @@ __wt_session_lock_dhandle(
if ((ret = __wt_try_writelock(session, dhandle->rwlock)) == 0) {
if (F_ISSET(dhandle, WT_DHANDLE_DEAD)) {
*is_deadp = 1;
- return (
- __wt_writeunlock(session, dhandle->rwlock));
+ __wt_writeunlock(session, dhandle->rwlock);
+ return (0);
}
/*
@@ -217,8 +217,7 @@ __wt_session_lock_dhandle(
if (F_ISSET(dhandle, WT_DHANDLE_OPEN) &&
!want_exclusive) {
lock_busy = false;
- WT_RET(
- __wt_writeunlock(session, dhandle->rwlock));
+ __wt_writeunlock(session, dhandle->rwlock);
continue;
}
@@ -287,12 +286,11 @@ __wt_session_release_btree(WT_SESSION_IMPL *session)
locked = false;
}
if (locked) {
- if (write_locked)
+ if (write_locked) {
F_CLR(dhandle, WT_DHANDLE_EXCLUSIVE);
-
- WT_TRET(write_locked ?
- __wt_writeunlock(session, dhandle->rwlock):
- __wt_readunlock(session, dhandle->rwlock));
+ __wt_writeunlock(session, dhandle->rwlock);
+ } else
+ __wt_readunlock(session, dhandle->rwlock);
}
session->dhandle = NULL;
@@ -514,7 +512,7 @@ __wt_session_get_btree(WT_SESSION_IMPL *session,
dhandle->excl_session = NULL;
dhandle->excl_ref = 0;
F_CLR(dhandle, WT_DHANDLE_EXCLUSIVE);
- WT_RET(__wt_writeunlock(session, dhandle->rwlock));
+ __wt_writeunlock(session, dhandle->rwlock);
WT_WITH_SCHEMA_LOCK(session, ret,
WT_WITH_HANDLE_LIST_LOCK(session,
@@ -536,7 +534,7 @@ __wt_session_get_btree(WT_SESSION_IMPL *session,
dhandle->excl_session = NULL;
dhandle->excl_ref = 0;
F_CLR(dhandle, WT_DHANDLE_EXCLUSIVE);
- WT_TRET(__wt_writeunlock(session, dhandle->rwlock));
+ __wt_writeunlock(session, dhandle->rwlock);
WT_RET(ret);
}