|
Zero
0.1.0
|
A transaction. Internal to the storage manager.This class may be used in a limited way for the handling of out-of-log-space conditions. More...
#include <xct.h>
Public Types | |
| enum | elr_mode_t { elr_none, elr_s, elr_sx, elr_clv } |
Static Public Member Functions | |
| static xct_t * | look_up (const tid_t &tid) |
| static tid_t | oldest_tid () |
| static tid_t | youngest_tid () |
| static uint32_t | num_active_xcts () |
| static size_t | get_loser_count () |
| static void | fuzzy_checkpoint (chkpt_t &chkpt) |
| static w_rc_t | acquire_xlist_mutex () |
| static void | release_xlist_mutex () |
| static void | assert_xlist_mutex_not_mine () |
| static void | assert_xlist_mutex_is_mine () |
| static bool | xlist_mutex_is_mine () |
Protected Member Functions | |
| void | put_in_order () |
| rc_t | _abort () |
| rc_t | _commit (uint32_t flags, lsn_t *plastlsn=nullptr) |
| rc_t | _commit_read_only (uint32_t flags, lsn_t &inherited_read_watermark) |
| rc_t | _pre_commit (uint32_t flags) |
| rc_t | _pre_abort () |
| bool | should_consume_rollback_resv (int t) const |
| bool | should_reserve_for_rollback (int t) const |
Static Protected Member Functions | |
| static lockid_t * | new_lock_hierarchy () |
Protected Attributes | |
| w_link_t | _xlink |
| lsn_t | _first_lsn |
| lsn_t | _last_lsn |
| lsn_t | _undo_nxt |
| lsn_t | _read_watermark |
| elr_mode_t | _elr_mode |
| std::chrono::high_resolution_clock::time_point | _begin_tstamp |
| bool | _rolling_back |
Static Protected Attributes | |
| static w_descend_list_t< xct_t, queue_based_lock_t, tid_t > | _xlist |
| static std::atomic< tid_t > | _nxt_tid {0} |
| static tid_t | _oldest_tid = 0 |
Private Member Functions | |
| bool | one_thread_attached () const |
| void | _compensate (const lsn_t &, bool undoable=false) |
| w_rc_t | _sync_logbuf (bool block=true, bool signal=true) |
| void | _teardown (bool is_chaining) |
Static Private Member Functions | |
| static void | xct_stats (u_long &begins, u_long &commits, u_long &aborts, bool reset) |
Private Attributes | |
| sm_stats_t * | __stats |
| lockid_t * | __saved_lockid_t |
| tid_t | _tid |
| uint32_t | _xct_chain_len |
| uint32_t | _ssx_chain_len |
| The count of consecutive SSXs conveyed by this transaction object. More... | |
| concurrency_t | _query_concurrency |
| bool | _query_exlock_for_select |
| bool | _piggy_backed_single_log_sys_xct |
| bool | _sys_xct |
| bool | _single_log_sys_xct |
| bool | _deferred_ssx |
| bool | _inquery_verify |
| bool | _inquery_verify_keyorder |
| bool | _inquery_verify_space |
| inquery_verify_context_t | _inquery_verify_context |
| loser_xct_state_t | _loser_xct |
| latch_t | _latch |
| lintel::Atomic< int > | _in_compensated_op |
| lsn_t | _anchor |
Static Private Attributes | |
| static queue_based_lock_t | _xlist_mutex |
A transaction. Internal to the storage manager.
This class may be used in a limited way for the handling of out-of-log-space conditions.
skip
| enum xct_t::elr_mode_t |
Early Lock Release mode. This is a totally separated implementation from Quarks.
|
protected |
|
private |
|
protected |
|
protected |
|
private |
|
private |
|
static |
| void xct_t::AddLoadStore | ( | const StoreID & | stid | ) |
| void xct_t::AddStoreToFree | ( | const StoreID & | stid | ) |
|
static |
|
static |
| ostream & xct_t::dump_locks | ( | ostream & | out | ) | const |
|
inline |
| const lsn_t& xct_t::first_lsn | ( | ) | const |
| void xct_t::force_nonblocking | ( | ) |
|
static |
|
inline |
|
static |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| const logrec_t* xct_t::last_log | ( | ) | const |
| const lsn_t& xct_t::last_lsn | ( | ) | const |
skip skip
|
inline |
|
inline |
| lil_private_table * xct_t::lil_lock_info | ( | ) | const |
| xct_lock_info_t * xct_t::lock_info | ( | ) | const |
| void xct_t::log_warn_disable | ( | ) |
skip
| bool xct_t::log_warn_is_on | ( | ) | const |
| void xct_t::log_warn_resume | ( | ) |
|
staticprotected |
|
static |
skip
|
static |
|
private |
|
protected |
| RawXct * xct_t::raw_lock_xct | ( | ) | const |
|
static |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
| const lsn_t& xct_t::undo_nxt | ( | ) | const |
|
inline |
|
staticprivate |
|
static |
|
static |
|
private |
|
private |
|
private |
|
protected |
|
private |
whether to defer the logging and applying of the change made by single-log system transaxction (SSX). Experimental.
|
protected |
|
protected |
|
private |
|
private |
whether in-query verification is on.
|
private |
result and context of in-query verification.
|
private |
whether to additionally check the sortedness and uniqueness of keys.
|
private |
whether to check any overlaps of records and integrity of space offset.
|
protected |
|
private |
|
private |
|
staticprotected |
|
staticprotected |
|
private |
true if this transaction is now conveying a single-log system transaction.
|
private |
concurrency mode of this transaction.
|
private |
whether to take X lock for lookup/cursor.
|
protected |
Whenever a transaction acquires some lock, this value is updated as _read_watermark=max(_read_watermark, lock_bucket.tag) so that we maintain a maximum commit LSN of transactions it depends on. This value is used to commit a read-only transaction with Safe SX-ELR to block until the log manager flushed the log buffer at least to this value. Assuming this protocol, we can do ELR for x-locks. See jira ticket:99 "ELR for X-lock" (originally trac ticket:101).
|
protected |
As SSX log must be separated from outer transaction's logs, we maintain another buffer. This buffer is only used during one get/give_logbuf() call because it's SSX. Also, again because it's SSX, it can contain only one log.
|
private |
whether this transaction will have at most one xlog entry
|
private |
The count of consecutive SSXs conveyed by this transaction object.
SSX can't nest SSX. However, as SSX doesn't care what the transaction object is, SSX can chain an arbitraly number of SSXs as far as they are consecutive SSXs, no multi-log system transactions or user-transactions in-between. In that case, we simply increment/decrement this counter when we start/end SSX. Chaining is useful when SSX operation might cause another SSX operation, eg ghost-reservation causes page-split which causes page-evict etc etc.
|
private |
whether this transaction is a system transaction.
|
private |
|
protected |
|
private |
number of previously committed xcts on this thread as a chain. If 0, there is no chained previous xct.
|
protected |
|
staticprotected |
|
staticprivate |
1.8.12