49 void dump(ostream& o);
53 u_long& max_bucket_len,
54 u_long& min_bucket_len,
55 u_long& mode_bucket_len,
56 float& avg_bucket_len,
57 float& var_bucket_len,
106 bool check,
bool wait,
bool acquire,
static void on_thread_destroy()
Lock Manager API.See Orthogonal Key Value Locking and Light-weight Intent Lock.
Definition: lock.h:27
rc_t retry_lock(RawLock **lock, bool check_only, int timeout=timeout_t::WAIT_SPECIFIED_BY_XCT)
Definition: lock.cpp:128
lil_global_table * get_lil_global_table()
Definition: lock.cpp:45
Lock table implementation class.
Definition: lock_core.h:31
int _convert_timeout(int timeout)
Definition: lock.cpp:61
void dump(ostream &o)
Unsafely dump the lock hash table (for debugging).
Definition: lock.cpp:39
Definition: lock_lil.h:147
A shadow transaction object for RAW-style lock manager.
Definition: lock_raw.h:469
A transaction. Internal to the storage manager.This class may be used in a limited way for the handli...
Definition: xct.h:185
uint32_t StoreID
Definition: basics.h:47
RawXct * allocate_xct()
Definition: lock.cpp:212
~lock_m()
Definition: lock.cpp:27
Start-up parameters for the storage engine. See OPTIONS.
Definition: sm_options.h:24
static const lsn_t null
Definition: lsn.h:371
Locking-related status of one transaction.
Definition: lock_x.h:127
element_lock_mode
Lock mode for one OKVL component (key, partition, or gap).
Definition: w_okvl.h:107
void unlock(RawLock *lock, lsn_t commit_lsn=lsn_t::null)
Definition: lock.cpp:144
void deallocate_xct(RawXct *xct)
Definition: lock.cpp:216
void assert_empty() const
Unsafely check that the lock table is empty for debugging and assertions at shutdown, when MT-safety shouldn't be an issue.
Definition: lock.cpp:23
void stats(u_long &buckets_used, u_long &max_bucket_len, u_long &min_bucket_len, u_long &mode_bucket_len, float &avg_bucket_len, float &var_bucket_len, float &std_bucket_len) const
Log Sequence Number. See Log Sequence Numbers (LSN).
Definition: lsn.h:243
An RAW-style lock entry in the queue.
Definition: lock_raw.h:133
static constexpr int WAIT_SPECIFIED_BY_XCT
Definition: timeout.h:30
Return code for most functions and methods.
Definition: w_rc.h:87
static void on_thread_init()
Operating system error Malloc Mmap could not map aligned memory Internal error Timed out waiting for resource Bad file descriptor for I O or close Short I O Internal error Feature is not implemented User initiated abort Out of disk space Item not found Invalid volume ID Device is too large for OS file interface Device is not mounted Volume already exists Too many volumes Duplicate entries found Maximum number of stores already created Out of log space Record will not fit Bad save point Bad argument or combination of arguments to function Multiple update threads not allowed for this operation In active Logging is turned off cannot roll back Transaction is not participating in external phase commit Lock timeout Attempt to acquire maintain latch in Q mode failed Need parent and child page fixed in SH or EX modes Deadlock detected Retry the but had some Retry related to locks(used internally)") X(eTOOMANYRETRY
Represents a lock mode of one key entry in the OKVL lock manager.
Definition: w_okvl.h:95
lock_core_m * core() const
Definition: lock.h:142
okvl_mode get_granted_mode(uint32_t hash, xct_t *xd=nullptr)
Returns the lock granted to the given transaction for this lock.
Definition: lock.cpp:49
xct_t * xct()
Definition: smthread.h:575
rc_t lock(uint32_t hash, const okvl_mode &m, bool check, bool wait, bool acquire, xct_t *=nullptr, int timeout=timeout_t::WAIT_SPECIFIED_BY_XCT, RawLock **out=nullptr)
Acquires a lock of the given mode (or stronger)
Definition: lock.cpp:89
lock_core_m * _core
Definition: lock.h:146
rc_t unlock_duration(bool read_lock_only=false, lsn_t commit_lsn=lsn_t::null)
Definition: lock.cpp:185
lock_m(const sm_options &options)
Definition: lock.cpp:17
rc_t intent_store_lock(StoreID stid, okvl_mode::element_lock_mode m)
Definition: lock.cpp:164
static void lock_stats(u_long &locks, u_long &acquires, u_long &cache_hits, u_long &unlocks, bool reset)
void give_permission_to_violate(lsn_t commit_lsn=lsn_t::null)
Definition: lock.cpp:202