keydecoder

package
v1.1.0-beta.0...-a3f823d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DecodedKey

type DecodedKey struct {
	DbName            string     `json:"db_name,omitempty"`
	TableName         string     `json:"table_name,omitempty"`
	PartitionName     string     `json:"partition_name,omitempty"`
	HandleType        HandleType `json:"handle_type,omitempty"`
	HandleValue       string     `json:"handle_value,omitempty"`
	IndexName         string     `json:"index_name,omitempty"`
	IndexValues       []string   `json:"index_values,omitempty"`
	DbID              int64      `json:"db_id,omitempty"`
	TableID           int64      `json:"table_id"`
	PartitionID       int64      `json:"partition_id,omitempty"`
	IndexID           int64      `json:"index_id,omitempty"`
	IsPartitionHandle bool       `json:"partition_handle,omitempty"`
}

DecodedKey is a struct contains detailed information about a key, its json form should be used to fill KEY_INFO field in `DEADLOCKS` and `DATA_LOCK_WAITS`

func DecodeKey

func DecodeKey(key []byte, is infoschema.InfoSchema) (DecodedKey, error)

DecodeKey decodes `key` (either a Record key or an Index key) into `DecodedKey`, which is used to fill KEY_INFO field in `DEADLOCKS` and `DATA_LOCK_WAITS`

type HandleType

type HandleType string

HandleType is the type of a Handle, could be `int`(ie. kv.IntHandle) or `common`(ie. *kv.CommonHandle)

const (
	IntHandle    HandleType = "int"
	CommonHandle HandleType = "common"

	UnknownHandle HandleType = "unknown"
)

HandleType instances

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL