Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Latch ¶
Latch stores a key's waiting transactions information.
type Latches ¶
Latches which are used for concurrency control. Each latch is indexed by a slot's ID, hence the term latch and slot are used in interchangeable, but conceptually a latch is a queue, and a slot is an index to the queue
func NewLatches ¶
NewLatches create a Latches with fixed length, the size will be rounded up to the power of 2.
func (*Latches) Acquire ¶
Acquire tries to acquire the lock for a transaction. It returns with stale = true when the transaction is stale( when the lock.startTS is smaller than any key's last commitTS).
func (*Latches) GenLock ¶
GenLock generates Lock for the transaction with startTS and keys.
Click to show internal directories.
Click to hide internal directories.