keydecoder

package
v0.0.0-...-503c688 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 8 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, infoschema 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