diff options
Diffstat (limited to 'src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c')
-rw-r--r-- | src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c b/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c index 5201d63f685..424ebf68445 100644 --- a/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c +++ b/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c @@ -454,12 +454,12 @@ __txn_rollback_to_stable_check(WT_SESSION_IMPL *session) } /* - * __wt_txn_rollback_to_stable -- + * __txn_rollback_to_stable -- * Rollback all in-memory state related to timestamps more recent than * the passed in timestamp. */ -int -__wt_txn_rollback_to_stable(WT_SESSION_IMPL *session, const char *cfg[]) +static int +__txn_rollback_to_stable(WT_SESSION_IMPL *session, const char *cfg[]) { WT_CONNECTION_IMPL *conn; WT_DECL_RET; @@ -510,3 +510,26 @@ err: F_CLR(conn, WT_CONN_EVICTION_NO_LOOKASIDE); __wt_free(session, conn->stable_rollback_bitstring); return (ret); } + +/* + * __wt_txn_rollback_to_stable -- + * Rollback all in-memory state related to timestamps more recent than + * the passed in timestamp. + */ +int +__wt_txn_rollback_to_stable(WT_SESSION_IMPL *session, const char *cfg[]) +{ + WT_DECL_RET; + + /* + * Don't use the connection's default session: we are working on data + * handles and (a) don't want to cache all of them forever, plus (b) + * can't guarantee that no other method will be called concurrently. + */ + WT_RET(__wt_open_internal_session(S2C(session), + "txn rollback_to_stable", true, 0, &session)); + ret = __txn_rollback_to_stable(session, cfg); + WT_TRET(session->iface.close(&session->iface, NULL)); + + return (ret); +} |