Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrLockNotFound = ErrRetryable("lock not found") ErrAlreadyRollback = ErrRetryable("already rollback") ErrReplaced = ErrRetryable("replaced by another transaction") )
ErrRetryable
Functions ¶
This section is empty.
Types ¶
type ErrAlreadyCommitted ¶
type ErrAlreadyCommitted uint64
ErrAlreadyCommitted is returned specially when client tries to rollback a committed lock.
func (ErrAlreadyCommitted) Error ¶
func (ErrAlreadyCommitted) Error() string
type ErrAssertionFailed ¶
type ErrAssertionFailed struct { StartTS uint64 Key []byte Assertion kvrpcpb.Assertion ExistingStartTS uint64 ExistingCommitTS uint64 }
ErrAssertionFailed is returned if any assertion fails on a transaction request.
func (*ErrAssertionFailed) Error ¶
func (e *ErrAssertionFailed) Error() string
type ErrCommitExpire ¶
ErrCommitExpire is returned when commit key commitTs smaller than lock.MinCommitTs
func (*ErrCommitExpire) Error ¶
func (*ErrCommitExpire) Error() string
type ErrConflict ¶
type ErrConflict struct { StartTS uint64 ConflictTS uint64 ConflictCommitTS uint64 Key []byte Reason kvrpcpb.WriteConflict_Reason }
ErrConflict is the error when the commit meets an write conflict error.
func (*ErrConflict) Error ¶
func (*ErrConflict) Error() string
type ErrDeadlock ¶
type ErrDeadlock struct { LockKey []byte LockTS uint64 DeadlockKeyHash uint64 WaitChain []*deadlockpb.WaitForEntry }
ErrDeadlock is returned when deadlock is detected.
func (ErrDeadlock) Error ¶
func (ErrDeadlock) Error() string
type ErrInvalidOp ¶
ErrInvalidOp is returned when an operation cannot be completed.
func (ErrInvalidOp) Error ¶
func (e ErrInvalidOp) Error() string
type ErrKeyAlreadyExists ¶
type ErrKeyAlreadyExists struct {
Key []byte
}
ErrKeyAlreadyExists is returned when a key already exists.
func (ErrKeyAlreadyExists) Error ¶
func (ErrKeyAlreadyExists) Error() string
type ErrLocked ¶
ErrLocked is returned when trying to Read/Write on a locked key. Client should backoff or cleanup the lock then retry.
func BuildLockErr ¶
BuildLockErr generates ErrKeyLocked objects
type ErrPrimaryMismatch ¶
ErrPrimaryMismatch is returned if CheckTxnStatus request is sent to a secondary lock.
func (*ErrPrimaryMismatch) Error ¶
func (e *ErrPrimaryMismatch) Error() string
type ErrRetryable ¶
type ErrRetryable string
ErrRetryable suggests that client may restart the txn. e.g. write conflict.
func (ErrRetryable) Error ¶
func (e ErrRetryable) Error() string
type ErrTxnNotFound ¶
ErrTxnNotFound is returned if the required txn info not found on storage
func (*ErrTxnNotFound) Error ¶
func (*ErrTxnNotFound) Error() string