db

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpPreCommit  = uint32(apipb.OpCode_OpPreCommit)
	OpGetLogTail = uint32(apipb.OpCode_OpGetLogTail)
)
View Source
const (
	EnableFaultInjection  = "enable_fault_injection"
	DisableFaultInjection = "disable_fault_injection"
)
View Source
const (
	InspectNormal = 0
	InspectCata   = 1
)
View Source
const (
	LockName string = "TAE"
)
View Source
const (
	WALDir = "wal"
)

Variables

View Source
var (
	ErrInvalidLengthOperations        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowOperations          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupOperations = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrTaskDuplicated = moerr.NewInternalErrorNoCtx("tae task: duplicated task found")
	ErrTaskNotFound   = moerr.NewInternalErrorNoCtx("tae task: task not found")
)
View Source
var (
	ErrClosed = moerr.NewInternalErrorNoCtx("tae: closed")
)

Functions

func NewDBScanner

func NewDBScanner(db *DB, errHandler ErrHandler) *dbScanner

func ScopeConflictCheck

func ScopeConflictCheck(oldScope, newScope *common.ID) (err error)

func TaeMetricsTask added in v1.0.0

func TaeMetricsTask(ctx context.Context)

Types

type AccessInfo added in v0.6.0

type AccessInfo struct {
	AccountID uint32
	UserID    uint32
	RoleID    uint32
}

func (*AccessInfo) Descriptor added in v0.8.0

func (*AccessInfo) Descriptor() ([]byte, []int)

func (*AccessInfo) GetAccountID added in v0.8.0

func (m *AccessInfo) GetAccountID() uint32

func (*AccessInfo) GetRoleID added in v0.8.0

func (m *AccessInfo) GetRoleID() uint32

func (*AccessInfo) GetUserID added in v0.8.0

func (m *AccessInfo) GetUserID() uint32

func (*AccessInfo) Marshal added in v0.8.0

func (m *AccessInfo) Marshal() (dAtA []byte, err error)

func (*AccessInfo) MarshalTo added in v0.8.0

func (m *AccessInfo) MarshalTo(dAtA []byte) (int, error)

func (*AccessInfo) MarshalToSizedBuffer added in v0.8.0

func (m *AccessInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AccessInfo) ProtoMessage added in v0.8.0

func (*AccessInfo) ProtoMessage()

func (*AccessInfo) ProtoSize added in v0.8.0

func (m *AccessInfo) ProtoSize() (n int)

func (*AccessInfo) Reset added in v0.8.0

func (m *AccessInfo) Reset()

func (*AccessInfo) String added in v0.8.0

func (m *AccessInfo) String() string

func (*AccessInfo) Unmarshal added in v0.8.0

func (m *AccessInfo) Unmarshal(dAtA []byte) error

func (*AccessInfo) XXX_DiscardUnknown added in v0.8.0

func (m *AccessInfo) XXX_DiscardUnknown()

func (*AccessInfo) XXX_Marshal added in v0.8.0

func (m *AccessInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccessInfo) XXX_Merge added in v0.8.0

func (m *AccessInfo) XXX_Merge(src proto.Message)

func (*AccessInfo) XXX_Size added in v0.8.0

func (m *AccessInfo) XXX_Size() int

func (*AccessInfo) XXX_Unmarshal added in v0.8.0

func (m *AccessInfo) XXX_Unmarshal(b []byte) error

type BlockMetaInfo added in v1.0.1

type BlockMetaInfo struct {
	Info []uint64
}

func (*BlockMetaInfo) Descriptor added in v1.0.1

func (*BlockMetaInfo) Descriptor() ([]byte, []int)

func (*BlockMetaInfo) GetInfo added in v1.0.1

func (m *BlockMetaInfo) GetInfo() []uint64

func (*BlockMetaInfo) Marshal added in v1.0.1

func (m *BlockMetaInfo) Marshal() (dAtA []byte, err error)

func (*BlockMetaInfo) MarshalBinary added in v1.0.1

func (b *BlockMetaInfo) MarshalBinary() ([]byte, error)

func (*BlockMetaInfo) MarshalTo added in v1.0.1

func (m *BlockMetaInfo) MarshalTo(dAtA []byte) (int, error)

func (*BlockMetaInfo) MarshalToSizedBuffer added in v1.0.1

func (m *BlockMetaInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*BlockMetaInfo) ProtoMessage added in v1.0.1

func (*BlockMetaInfo) ProtoMessage()

func (*BlockMetaInfo) ProtoSize added in v1.0.1

func (m *BlockMetaInfo) ProtoSize() (n int)

func (*BlockMetaInfo) Reset added in v1.0.1

func (m *BlockMetaInfo) Reset()

func (*BlockMetaInfo) String added in v1.0.1

func (m *BlockMetaInfo) String() string

func (*BlockMetaInfo) Unmarshal added in v1.0.1

func (m *BlockMetaInfo) Unmarshal(dAtA []byte) error

func (*BlockMetaInfo) UnmarshalBinary added in v1.0.1

func (b *BlockMetaInfo) UnmarshalBinary(data []byte) error

func (*BlockMetaInfo) XXX_DiscardUnknown added in v1.0.1

func (m *BlockMetaInfo) XXX_DiscardUnknown()

func (*BlockMetaInfo) XXX_Marshal added in v1.0.1

func (m *BlockMetaInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BlockMetaInfo) XXX_Merge added in v1.0.1

func (m *BlockMetaInfo) XXX_Merge(src proto.Message)

func (*BlockMetaInfo) XXX_Size added in v1.0.1

func (m *BlockMetaInfo) XXX_Size() int

func (*BlockMetaInfo) XXX_Unmarshal added in v1.0.1

func (m *BlockMetaInfo) XXX_Unmarshal(b []byte) error

type CatalogResp added in v0.7.0

type CatalogResp struct {
	Item string         `json:"Item,omitempty"`
	Sub  []*CatalogResp `json:"Sub,omitempty"`
}

func (*CatalogResp) Descriptor added in v0.8.0

func (*CatalogResp) Descriptor() ([]byte, []int)

func (*CatalogResp) GetItem added in v0.8.0

func (m *CatalogResp) GetItem() string

func (*CatalogResp) GetSub added in v0.8.0

func (m *CatalogResp) GetSub() []*CatalogResp

func (*CatalogResp) Marshal added in v0.8.0

func (m *CatalogResp) Marshal() (dAtA []byte, err error)

func (*CatalogResp) MarshalBinary added in v0.8.0

func (m *CatalogResp) MarshalBinary() ([]byte, error)

func (*CatalogResp) MarshalTo added in v0.8.0

func (m *CatalogResp) MarshalTo(dAtA []byte) (int, error)

func (*CatalogResp) MarshalToSizedBuffer added in v0.8.0

func (m *CatalogResp) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CatalogResp) ProtoMessage added in v0.8.0

func (*CatalogResp) ProtoMessage()

func (*CatalogResp) ProtoSize added in v0.8.0

func (m *CatalogResp) ProtoSize() (n int)

func (*CatalogResp) Reset added in v0.8.0

func (m *CatalogResp) Reset()

func (*CatalogResp) String added in v0.8.0

func (m *CatalogResp) String() string

func (*CatalogResp) Unmarshal added in v0.8.0

func (m *CatalogResp) Unmarshal(dAtA []byte) error

func (*CatalogResp) UnmarshalBinary added in v0.8.0

func (m *CatalogResp) UnmarshalBinary(data []byte) error

func (*CatalogResp) XXX_DiscardUnknown added in v0.8.0

func (m *CatalogResp) XXX_DiscardUnknown()

func (*CatalogResp) XXX_Marshal added in v0.8.0

func (m *CatalogResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CatalogResp) XXX_Merge added in v0.8.0

func (m *CatalogResp) XXX_Merge(src proto.Message)

func (*CatalogResp) XXX_Size added in v0.8.0

func (m *CatalogResp) XXX_Size() int

func (*CatalogResp) XXX_Unmarshal added in v0.8.0

func (m *CatalogResp) XXX_Unmarshal(b []byte) error

type Checkpoint added in v0.7.0

type Checkpoint struct {
	FlushDuration time.Duration
	Enable        bool
}

func (*Checkpoint) Descriptor added in v0.8.0

func (*Checkpoint) Descriptor() ([]byte, []int)

func (*Checkpoint) GetEnable added in v1.2.1

func (m *Checkpoint) GetEnable() bool

func (*Checkpoint) GetFlushDuration added in v0.8.0

func (m *Checkpoint) GetFlushDuration() time.Duration

func (*Checkpoint) Marshal added in v0.8.0

func (m *Checkpoint) Marshal() (dAtA []byte, err error)

func (*Checkpoint) MarshalBinary added in v0.8.0

func (m *Checkpoint) MarshalBinary() ([]byte, error)

func (*Checkpoint) MarshalTo added in v0.8.0

func (m *Checkpoint) MarshalTo(dAtA []byte) (int, error)

func (*Checkpoint) MarshalToSizedBuffer added in v0.8.0

func (m *Checkpoint) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Checkpoint) ProtoMessage added in v0.8.0

func (*Checkpoint) ProtoMessage()

func (*Checkpoint) ProtoSize added in v0.8.0

func (m *Checkpoint) ProtoSize() (n int)

func (*Checkpoint) Reset added in v0.8.0

func (m *Checkpoint) Reset()

func (*Checkpoint) String added in v0.8.0

func (m *Checkpoint) String() string

func (*Checkpoint) Unmarshal added in v0.8.0

func (m *Checkpoint) Unmarshal(dAtA []byte) error

func (*Checkpoint) UnmarshalBinary added in v0.8.0

func (m *Checkpoint) UnmarshalBinary(data []byte) error

func (*Checkpoint) XXX_DiscardUnknown added in v0.8.0

func (m *Checkpoint) XXX_DiscardUnknown()

func (*Checkpoint) XXX_Marshal added in v0.8.0

func (m *Checkpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Checkpoint) XXX_Merge added in v0.8.0

func (m *Checkpoint) XXX_Merge(src proto.Message)

func (*Checkpoint) XXX_Size added in v0.8.0

func (m *Checkpoint) XXX_Size() int

func (*Checkpoint) XXX_Unmarshal added in v0.8.0

func (m *Checkpoint) XXX_Unmarshal(b []byte) error

type CkpMetaInfo added in v1.0.1

type CkpMetaInfo struct {
	Version  uint32
	Location []byte
}

func (*CkpMetaInfo) Descriptor added in v1.0.1

func (*CkpMetaInfo) Descriptor() ([]byte, []int)

func (*CkpMetaInfo) GetLocation added in v1.0.1

func (m *CkpMetaInfo) GetLocation() []byte

func (*CkpMetaInfo) GetVersion added in v1.0.1

func (m *CkpMetaInfo) GetVersion() uint32

func (*CkpMetaInfo) Marshal added in v1.0.1

func (m *CkpMetaInfo) Marshal() (dAtA []byte, err error)

func (*CkpMetaInfo) MarshalBinary added in v1.0.1

func (c *CkpMetaInfo) MarshalBinary() ([]byte, error)

func (*CkpMetaInfo) MarshalTo added in v1.0.1

func (m *CkpMetaInfo) MarshalTo(dAtA []byte) (int, error)

func (*CkpMetaInfo) MarshalToSizedBuffer added in v1.0.1

func (m *CkpMetaInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CkpMetaInfo) ProtoMessage added in v1.0.1

func (*CkpMetaInfo) ProtoMessage()

func (*CkpMetaInfo) ProtoSize added in v1.0.1

func (m *CkpMetaInfo) ProtoSize() (n int)

func (*CkpMetaInfo) Reset added in v1.0.1

func (m *CkpMetaInfo) Reset()

func (*CkpMetaInfo) String added in v1.0.1

func (m *CkpMetaInfo) String() string

func (*CkpMetaInfo) Unmarshal added in v1.0.1

func (m *CkpMetaInfo) Unmarshal(dAtA []byte) error

func (*CkpMetaInfo) UnmarshalBinary added in v1.0.1

func (c *CkpMetaInfo) UnmarshalBinary(data []byte) error

func (*CkpMetaInfo) XXX_DiscardUnknown added in v1.0.1

func (m *CkpMetaInfo) XXX_DiscardUnknown()

func (*CkpMetaInfo) XXX_Marshal added in v1.0.1

func (m *CkpMetaInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CkpMetaInfo) XXX_Merge added in v1.0.1

func (m *CkpMetaInfo) XXX_Merge(src proto.Message)

func (*CkpMetaInfo) XXX_Size added in v1.0.1

func (m *CkpMetaInfo) XXX_Size() int

func (*CkpMetaInfo) XXX_Unmarshal added in v1.0.1

func (m *CkpMetaInfo) XXX_Unmarshal(b []byte) error

type DB

type DB struct {
	Dir  string
	Opts *options.Options

	Catalog *catalog.Catalog

	TxnMgr *txnbase.TxnManager

	LogtailMgr *logtail.Manager
	Wal        wal.Driver

	GCManager *gc.Manager

	BGScanner          wb.IHeartbeater
	BGCheckpointRunner checkpoint.Runner
	MergeHandle        *MergeTaskBuilder

	DiskCleaner *gc2.DiskCleaner

	Runtime *dbutils.Runtime

	DBLocker io.Closer

	CNMergeSched merge.CNMergeScheduler

	Closed *atomic.Value
	// contains filtered or unexported fields
}

func Open

func Open(ctx context.Context, dirname string, opts *options.Options) (db *DB, err error)

func (*DB) AddFaultPoint added in v1.0.0

func (db *DB) AddFaultPoint(ctx context.Context, name string, freq string, action string, iarg int64, sarg string) error

func (*DB) Close

func (db *DB) Close() error

func (*DB) CommitTxn

func (db *DB) CommitTxn(txn txnif.AsyncTxn) (err error)

func (*DB) FlushTable added in v0.6.0

func (db *DB) FlushTable(
	ctx context.Context,
	tenantID uint32,
	dbId, tableId uint64,
	ts types.TS) (err error)

func (*DB) ForceCheckpoint added in v0.8.0

func (db *DB) ForceCheckpoint(
	ctx context.Context,
	ts types.TS,
	flushDuration time.Duration) (err error)

func (*DB) ForceCheckpointForBackup added in v1.1.0

func (db *DB) ForceCheckpointForBackup(
	ctx context.Context,
	ts types.TS,
	flushDuration time.Duration,
) (location string, err error)

func (*DB) ForceGlobalCheckpoint added in v1.1.2

func (db *DB) ForceGlobalCheckpoint(
	ctx context.Context,
	ts types.TS,
	flushDuration time.Duration) (err error)

func (*DB) GetOrCreateTxnWithMeta added in v0.6.0

func (db *DB) GetOrCreateTxnWithMeta(
	info []byte,
	id []byte,
	ts types.TS) (txn txnif.AsyncTxn, err error)

func (*DB) GetTxnByID added in v0.8.0

func (db *DB) GetTxnByID(id []byte) (txn txnif.AsyncTxn, err error)

func (*DB) GetUsageMemo added in v1.1.0

func (db *DB) GetUsageMemo() *logtail.TNUsageMemo

func (*DB) Replay

func (db *DB) Replay(dataFactory *tables.DataFactory, maxTs types.TS, lsn uint64, valid bool)

func (*DB) RollbackTxn

func (db *DB) RollbackTxn(txn txnif.AsyncTxn) error

func (*DB) StartTxn

func (db *DB) StartTxn(info []byte) (txnif.AsyncTxn, error)

func (*DB) StartTxnWithStartTSAndSnapshotTS added in v1.0.0

func (db *DB) StartTxnWithStartTSAndSnapshotTS(
	info []byte,
	ts types.TS) (txn txnif.AsyncTxn, err error)

type DBScanner

type DBScanner interface {
	base.IHBHandle
	RegisterOp(ScannerOp)
}

type DiskCleaner added in v1.2.1

type DiskCleaner struct {
	Op    string
	Key   string
	Value string
}

func (*DiskCleaner) Descriptor added in v1.2.1

func (*DiskCleaner) Descriptor() ([]byte, []int)

func (*DiskCleaner) GetKey added in v1.2.1

func (m *DiskCleaner) GetKey() string

func (*DiskCleaner) GetOp added in v1.2.1

func (m *DiskCleaner) GetOp() string

func (*DiskCleaner) GetValue added in v1.2.1

func (m *DiskCleaner) GetValue() string

func (*DiskCleaner) Marshal added in v1.2.1

func (m *DiskCleaner) Marshal() (dAtA []byte, err error)

func (*DiskCleaner) MarshalBinary added in v1.2.1

func (m *DiskCleaner) MarshalBinary() ([]byte, error)

func (*DiskCleaner) MarshalTo added in v1.2.1

func (m *DiskCleaner) MarshalTo(dAtA []byte) (int, error)

func (*DiskCleaner) MarshalToSizedBuffer added in v1.2.1

func (m *DiskCleaner) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DiskCleaner) ProtoMessage added in v1.2.1

func (*DiskCleaner) ProtoMessage()

func (*DiskCleaner) ProtoSize added in v1.2.1

func (m *DiskCleaner) ProtoSize() (n int)

func (*DiskCleaner) Reset added in v1.2.1

func (m *DiskCleaner) Reset()

func (*DiskCleaner) String added in v1.2.1

func (m *DiskCleaner) String() string

func (*DiskCleaner) Unmarshal added in v1.2.1

func (m *DiskCleaner) Unmarshal(dAtA []byte) error

func (*DiskCleaner) UnmarshalBinary added in v1.2.1

func (m *DiskCleaner) UnmarshalBinary(data []byte) error

func (*DiskCleaner) XXX_DiscardUnknown added in v1.2.1

func (m *DiskCleaner) XXX_DiscardUnknown()

func (*DiskCleaner) XXX_Marshal added in v1.2.1

func (m *DiskCleaner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DiskCleaner) XXX_Merge added in v1.2.1

func (m *DiskCleaner) XXX_Merge(src proto.Message)

func (*DiskCleaner) XXX_Size added in v1.2.1

func (m *DiskCleaner) XXX_Size() int

func (*DiskCleaner) XXX_Unmarshal added in v1.2.1

func (m *DiskCleaner) XXX_Unmarshal(b []byte) error

type EntryType added in v0.6.0

type EntryType int32
const (
	EntryInsert EntryType = 0
	EntryDelete EntryType = 1
)

type ErrHandler

type ErrHandler interface {
	OnObjectErr(entry *catalog.ObjectEntry, err error) error
	OnTableErr(entry *catalog.TableEntry, err error) error
	OnDatabaseErr(entry *catalog.DBEntry, err error) error
}

type FaultPoint added in v1.0.0

type FaultPoint struct {
	Name   string
	Freq   string
	Action string
	Iarg   int64
	Sarg   string
}

func (*FaultPoint) Descriptor added in v1.0.0

func (*FaultPoint) Descriptor() ([]byte, []int)

func (*FaultPoint) GetAction added in v1.0.0

func (m *FaultPoint) GetAction() string

func (*FaultPoint) GetFreq added in v1.0.0

func (m *FaultPoint) GetFreq() string

func (*FaultPoint) GetIarg added in v1.0.0

func (m *FaultPoint) GetIarg() int64

func (*FaultPoint) GetName added in v1.0.0

func (m *FaultPoint) GetName() string

func (*FaultPoint) GetSarg added in v1.0.0

func (m *FaultPoint) GetSarg() string

func (*FaultPoint) Marshal added in v1.0.0

func (m *FaultPoint) Marshal() (dAtA []byte, err error)

func (*FaultPoint) MarshalBinary added in v1.0.0

func (m *FaultPoint) MarshalBinary() ([]byte, error)

func (*FaultPoint) MarshalTo added in v1.0.0

func (m *FaultPoint) MarshalTo(dAtA []byte) (int, error)

func (*FaultPoint) MarshalToSizedBuffer added in v1.0.0

func (m *FaultPoint) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*FaultPoint) ProtoMessage added in v1.0.0

func (*FaultPoint) ProtoMessage()

func (*FaultPoint) ProtoSize added in v1.0.0

func (m *FaultPoint) ProtoSize() (n int)

func (*FaultPoint) Reset added in v1.0.0

func (m *FaultPoint) Reset()

func (*FaultPoint) String added in v1.0.0

func (m *FaultPoint) String() string

func (*FaultPoint) Unmarshal added in v1.0.0

func (m *FaultPoint) Unmarshal(dAtA []byte) error

func (*FaultPoint) UnmarshalBinary added in v1.0.0

func (m *FaultPoint) UnmarshalBinary(data []byte) error

func (*FaultPoint) XXX_DiscardUnknown added in v1.0.0

func (m *FaultPoint) XXX_DiscardUnknown()

func (*FaultPoint) XXX_Marshal added in v1.0.0

func (m *FaultPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FaultPoint) XXX_Merge added in v1.0.0

func (m *FaultPoint) XXX_Merge(src proto.Message)

func (*FaultPoint) XXX_Size added in v1.0.0

func (m *FaultPoint) XXX_Size() int

func (*FaultPoint) XXX_Unmarshal added in v1.0.0

func (m *FaultPoint) XXX_Unmarshal(b []byte) error

type FlushTable added in v0.6.0

type FlushTable struct {
	AccessInfo AccessInfo
	DatabaseID uint64
	TableID    uint64
}

func (*FlushTable) Descriptor added in v0.8.0

func (*FlushTable) Descriptor() ([]byte, []int)

func (*FlushTable) GetAccessInfo added in v0.8.0

func (m *FlushTable) GetAccessInfo() AccessInfo

func (*FlushTable) GetDatabaseID added in v0.8.0

func (m *FlushTable) GetDatabaseID() uint64

func (*FlushTable) GetTableID added in v0.8.0

func (m *FlushTable) GetTableID() uint64

func (*FlushTable) Marshal added in v0.8.0

func (m *FlushTable) Marshal() (dAtA []byte, err error)

func (*FlushTable) MarshalBinary added in v0.8.0

func (m *FlushTable) MarshalBinary() ([]byte, error)

func (*FlushTable) MarshalTo added in v0.8.0

func (m *FlushTable) MarshalTo(dAtA []byte) (int, error)

func (*FlushTable) MarshalToSizedBuffer added in v0.8.0

func (m *FlushTable) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*FlushTable) ProtoMessage added in v0.8.0

func (*FlushTable) ProtoMessage()

func (*FlushTable) ProtoSize added in v0.8.0

func (m *FlushTable) ProtoSize() (n int)

func (*FlushTable) Reset added in v0.8.0

func (m *FlushTable) Reset()

func (*FlushTable) String added in v0.8.0

func (m *FlushTable) String() string

func (*FlushTable) Unmarshal added in v0.8.0

func (m *FlushTable) Unmarshal(dAtA []byte) error

func (*FlushTable) UnmarshalBinary added in v0.8.0

func (m *FlushTable) UnmarshalBinary(data []byte) error

func (*FlushTable) XXX_DiscardUnknown added in v0.8.0

func (m *FlushTable) XXX_DiscardUnknown()

func (*FlushTable) XXX_Marshal added in v0.8.0

func (m *FlushTable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FlushTable) XXX_Merge added in v0.8.0

func (m *FlushTable) XXX_Merge(src proto.Message)

func (*FlushTable) XXX_Size added in v0.8.0

func (m *FlushTable) XXX_Size() int

func (*FlushTable) XXX_Unmarshal added in v0.8.0

func (m *FlushTable) XXX_Unmarshal(b []byte) error

type InspectResp added in v0.7.0

type InspectResp struct {
	Typ     int    `json:"-"`
	Message string `json:"msg"`
	Payload []byte `json:"-"`
}

func (*InspectResp) ConsoleString added in v1.0.0

func (m *InspectResp) ConsoleString() string

func (*InspectResp) Descriptor added in v0.8.0

func (*InspectResp) Descriptor() ([]byte, []int)

func (*InspectResp) GetMessage added in v0.8.0

func (m *InspectResp) GetMessage() string

func (*InspectResp) GetPayload added in v0.8.0

func (m *InspectResp) GetPayload() []byte

func (*InspectResp) GetResponse added in v0.7.0

func (m *InspectResp) GetResponse() any

func (*InspectResp) GetTyp added in v0.8.0

func (m *InspectResp) GetTyp() int

func (*InspectResp) Marshal added in v0.8.0

func (m *InspectResp) Marshal() (dAtA []byte, err error)

func (*InspectResp) MarshalBinary added in v0.8.0

func (m *InspectResp) MarshalBinary() ([]byte, error)

func (*InspectResp) MarshalTo added in v0.8.0

func (m *InspectResp) MarshalTo(dAtA []byte) (int, error)

func (*InspectResp) MarshalToSizedBuffer added in v0.8.0

func (m *InspectResp) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*InspectResp) ProtoMessage added in v0.8.0

func (*InspectResp) ProtoMessage()

func (*InspectResp) ProtoSize added in v0.8.0

func (m *InspectResp) ProtoSize() (n int)

func (*InspectResp) Reset added in v0.8.0

func (m *InspectResp) Reset()

func (*InspectResp) String added in v0.8.0

func (m *InspectResp) String() string

func (*InspectResp) Unmarshal added in v0.8.0

func (m *InspectResp) Unmarshal(dAtA []byte) error

func (*InspectResp) UnmarshalBinary added in v0.8.0

func (m *InspectResp) UnmarshalBinary(data []byte) error

func (*InspectResp) XXX_DiscardUnknown added in v0.8.0

func (m *InspectResp) XXX_DiscardUnknown()

func (*InspectResp) XXX_Marshal added in v0.8.0

func (m *InspectResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InspectResp) XXX_Merge added in v0.8.0

func (m *InspectResp) XXX_Merge(src proto.Message)

func (*InspectResp) XXX_Size added in v0.8.0

func (m *InspectResp) XXX_Size() int

func (*InspectResp) XXX_Unmarshal added in v0.8.0

func (m *InspectResp) XXX_Unmarshal(b []byte) error

type InspectTN added in v1.0.0

type InspectTN struct {
	AccessInfo AccessInfo
	Operation  string
}

func (*InspectTN) Descriptor added in v1.0.0

func (*InspectTN) Descriptor() ([]byte, []int)

func (*InspectTN) GetAccessInfo added in v1.0.0

func (m *InspectTN) GetAccessInfo() AccessInfo

func (*InspectTN) GetOperation added in v1.0.0

func (m *InspectTN) GetOperation() string

func (*InspectTN) Marshal added in v1.0.0

func (m *InspectTN) Marshal() (dAtA []byte, err error)

func (*InspectTN) MarshalBinary added in v1.0.0

func (m *InspectTN) MarshalBinary() ([]byte, error)

func (*InspectTN) MarshalTo added in v1.0.0

func (m *InspectTN) MarshalTo(dAtA []byte) (int, error)

func (*InspectTN) MarshalToSizedBuffer added in v1.0.0

func (m *InspectTN) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*InspectTN) ProtoMessage added in v1.0.0

func (*InspectTN) ProtoMessage()

func (*InspectTN) ProtoSize added in v1.0.0

func (m *InspectTN) ProtoSize() (n int)

func (*InspectTN) Reset added in v1.0.0

func (m *InspectTN) Reset()

func (*InspectTN) String added in v1.0.0

func (m *InspectTN) String() string

func (*InspectTN) Unmarshal added in v1.0.0

func (m *InspectTN) Unmarshal(dAtA []byte) error

func (*InspectTN) UnmarshalBinary added in v1.0.0

func (m *InspectTN) UnmarshalBinary(data []byte) error

func (*InspectTN) XXX_DiscardUnknown added in v1.0.0

func (m *InspectTN) XXX_DiscardUnknown()

func (*InspectTN) XXX_Marshal added in v1.0.0

func (m *InspectTN) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InspectTN) XXX_Merge added in v1.0.0

func (m *InspectTN) XXX_Merge(src proto.Message)

func (*InspectTN) XXX_Size added in v1.0.0

func (m *InspectTN) XXX_Size() int

func (*InspectTN) XXX_Unmarshal added in v1.0.0

func (m *InspectTN) XXX_Unmarshal(b []byte) error

type InterceptCommit added in v1.2.0

type InterceptCommit struct {
	TableName string
}

func (*InterceptCommit) Descriptor added in v1.2.0

func (*InterceptCommit) Descriptor() ([]byte, []int)

func (*InterceptCommit) GetTableName added in v1.2.0

func (m *InterceptCommit) GetTableName() string

func (*InterceptCommit) Marshal added in v1.2.0

func (m *InterceptCommit) Marshal() (dAtA []byte, err error)

func (*InterceptCommit) MarshalBinary added in v1.2.0

func (m *InterceptCommit) MarshalBinary() ([]byte, error)

func (*InterceptCommit) MarshalTo added in v1.2.0

func (m *InterceptCommit) MarshalTo(dAtA []byte) (int, error)

func (*InterceptCommit) MarshalToSizedBuffer added in v1.2.0

func (m *InterceptCommit) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*InterceptCommit) ProtoMessage added in v1.2.0

func (*InterceptCommit) ProtoMessage()

func (*InterceptCommit) ProtoSize added in v1.2.0

func (m *InterceptCommit) ProtoSize() (n int)

func (*InterceptCommit) Reset added in v1.2.0

func (m *InterceptCommit) Reset()

func (*InterceptCommit) String added in v1.2.0

func (m *InterceptCommit) String() string

func (*InterceptCommit) Unmarshal added in v1.2.0

func (m *InterceptCommit) Unmarshal(dAtA []byte) error

func (*InterceptCommit) UnmarshalBinary added in v1.2.0

func (m *InterceptCommit) UnmarshalBinary(data []byte) error

func (*InterceptCommit) XXX_DiscardUnknown added in v1.2.0

func (m *InterceptCommit) XXX_DiscardUnknown()

func (*InterceptCommit) XXX_Marshal added in v1.2.0

func (m *InterceptCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InterceptCommit) XXX_Merge added in v1.2.0

func (m *InterceptCommit) XXX_Merge(src proto.Message)

func (*InterceptCommit) XXX_Size added in v1.2.0

func (m *InterceptCommit) XXX_Size() int

func (*InterceptCommit) XXX_Unmarshal added in v1.2.0

func (m *InterceptCommit) XXX_Unmarshal(b []byte) error

type LocationKey added in v0.7.0

type LocationKey struct{}

type MergeTaskBuilder added in v0.7.0

type MergeTaskBuilder struct {
	*catalog.LoopProcessor
	// contains filtered or unexported fields
}

func (*MergeTaskBuilder) ConfigPolicy added in v1.0.0

func (s *MergeTaskBuilder) ConfigPolicy(tbl *catalog.TableEntry, c any)

func (*MergeTaskBuilder) GetPolicy added in v1.0.0

func (s *MergeTaskBuilder) GetPolicy(tbl *catalog.TableEntry) any

func (*MergeTaskBuilder) PostExecute added in v0.7.0

func (s *MergeTaskBuilder) PostExecute() error

func (*MergeTaskBuilder) PreExecute added in v0.7.0

func (s *MergeTaskBuilder) PreExecute() error

type NoopErrHandler

type NoopErrHandler struct{}

func (*NoopErrHandler) OnDatabaseErr

func (h *NoopErrHandler) OnDatabaseErr(entry *catalog.DBEntry, err error) error

func (*NoopErrHandler) OnObjectErr added in v1.1.0

func (h *NoopErrHandler) OnObjectErr(entry *catalog.ObjectEntry, err error) error

func (*NoopErrHandler) OnTableErr

func (h *NoopErrHandler) OnTableErr(entry *catalog.TableEntry, err error) error

type PKCheckType added in v0.8.0

type PKCheckType int32
const (
	//IncrementalDedup do not check uniqueness of PK before txn's snapshot TS.
	IncrementalDedup PKCheckType = 0
	//FullSkipWorkspaceDedup do not check uniqueness of PK against txn's workspace.
	FullSkipWorkspaceDedup PKCheckType = 1
	FullDedup              PKCheckType = 2
)

type RelationType added in v0.6.0

type RelationType uint8
const (
	RelationTable RelationType = iota + 1
	RelationView
)

type Replayer

type Replayer struct {
	DataFactory *tables.DataFactory
	// contains filtered or unexported fields
}

func (*Replayer) GetMaxTS

func (replayer *Replayer) GetMaxTS() types.TS

func (*Replayer) OnReplayEntry

func (replayer *Replayer) OnReplayEntry(group uint32, lsn uint64, payload []byte, typ uint16, info any)

func (*Replayer) OnReplayTxn added in v0.6.0

func (replayer *Replayer) OnReplayTxn(cmd txnif.TxnCmd, lsn uint64)

func (*Replayer) OnTimeStamp

func (replayer *Replayer) OnTimeStamp(ts types.TS)

func (*Replayer) PreReplayWal

func (replayer *Replayer) PreReplayWal()

func (*Replayer) Replay

func (replayer *Replayer) Replay()

type ScannerOp

type ScannerOp interface {
	catalog.Processor
	PreExecute() error
	PostExecute() error
}

type ScheduledTxnTask

type ScheduledTxnTask struct {
	*tasks.BaseTask
	// contains filtered or unexported fields
}

func NewScheduledTxnTask

func NewScheduledTxnTask(ctx *tasks.Context, db *DB, taskType tasks.TaskType, scopes []common.ID, factory tasks.TxnTaskFactory) (task *ScheduledTxnTask)

func (*ScheduledTxnTask) Execute

func (task *ScheduledTxnTask) Execute(ctx context.Context) (err error)

func (*ScheduledTxnTask) Scope

func (task *ScheduledTxnTask) Scope() *common.ID

func (*ScheduledTxnTask) Scopes

func (task *ScheduledTxnTask) Scopes() []common.ID

type StorageUsageReq added in v1.1.0

type StorageUsageReq struct {
	AccIds []int64
}

func (*StorageUsageReq) Descriptor added in v1.1.0

func (*StorageUsageReq) Descriptor() ([]byte, []int)

func (*StorageUsageReq) GetAccIds added in v1.1.0

func (m *StorageUsageReq) GetAccIds() []int64

func (*StorageUsageReq) Marshal added in v1.1.0

func (m *StorageUsageReq) Marshal() (dAtA []byte, err error)

func (*StorageUsageReq) MarshalBinary added in v1.1.0

func (s *StorageUsageReq) MarshalBinary() ([]byte, error)

func (*StorageUsageReq) MarshalTo added in v1.1.0

func (m *StorageUsageReq) MarshalTo(dAtA []byte) (int, error)

func (*StorageUsageReq) MarshalToSizedBuffer added in v1.1.0

func (m *StorageUsageReq) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*StorageUsageReq) ProtoMessage added in v1.1.0

func (*StorageUsageReq) ProtoMessage()

func (*StorageUsageReq) ProtoSize added in v1.1.0

func (m *StorageUsageReq) ProtoSize() (n int)

func (*StorageUsageReq) Reset added in v1.1.0

func (m *StorageUsageReq) Reset()

func (*StorageUsageReq) String added in v1.1.0

func (m *StorageUsageReq) String() string

func (*StorageUsageReq) Unmarshal added in v1.1.0

func (m *StorageUsageReq) Unmarshal(dAtA []byte) error

func (*StorageUsageReq) UnmarshalBinary added in v1.1.0

func (s *StorageUsageReq) UnmarshalBinary(data []byte) error

func (*StorageUsageReq) XXX_DiscardUnknown added in v1.1.0

func (m *StorageUsageReq) XXX_DiscardUnknown()

func (*StorageUsageReq) XXX_Marshal added in v1.1.0

func (m *StorageUsageReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StorageUsageReq) XXX_Merge added in v1.1.0

func (m *StorageUsageReq) XXX_Merge(src proto.Message)

func (*StorageUsageReq) XXX_Size added in v1.1.0

func (m *StorageUsageReq) XXX_Size() int

func (*StorageUsageReq) XXX_Unmarshal added in v1.1.0

func (m *StorageUsageReq) XXX_Unmarshal(b []byte) error

type StorageUsageResp added in v1.0.1

type StorageUsageResp struct {
	Succeed bool
	AccIds  []int64
	Sizes   []uint64
	Magic   uint64
}

func (*StorageUsageResp) Descriptor added in v1.0.1

func (*StorageUsageResp) Descriptor() ([]byte, []int)

func (*StorageUsageResp) GetAccIds added in v1.1.0

func (m *StorageUsageResp) GetAccIds() []int64

func (*StorageUsageResp) GetMagic added in v1.1.0

func (m *StorageUsageResp) GetMagic() uint64

func (*StorageUsageResp) GetSizes added in v1.1.0

func (m *StorageUsageResp) GetSizes() []uint64

func (*StorageUsageResp) GetSucceed added in v1.0.1

func (m *StorageUsageResp) GetSucceed() bool

func (*StorageUsageResp) Marshal added in v1.0.1

func (m *StorageUsageResp) Marshal() (dAtA []byte, err error)

func (*StorageUsageResp) MarshalBinary added in v1.0.1

func (s *StorageUsageResp) MarshalBinary() ([]byte, error)

func (*StorageUsageResp) MarshalTo added in v1.0.1

func (m *StorageUsageResp) MarshalTo(dAtA []byte) (int, error)

func (*StorageUsageResp) MarshalToSizedBuffer added in v1.0.1

func (m *StorageUsageResp) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*StorageUsageResp) ProtoMessage added in v1.0.1

func (*StorageUsageResp) ProtoMessage()

func (*StorageUsageResp) ProtoSize added in v1.0.1

func (m *StorageUsageResp) ProtoSize() (n int)

func (*StorageUsageResp) Reset added in v1.0.1

func (m *StorageUsageResp) Reset()

func (*StorageUsageResp) String added in v1.0.1

func (m *StorageUsageResp) String() string

func (*StorageUsageResp) Unmarshal added in v1.0.1

func (m *StorageUsageResp) Unmarshal(dAtA []byte) error

func (*StorageUsageResp) UnmarshalBinary added in v1.0.1

func (s *StorageUsageResp) UnmarshalBinary(data []byte) error

func (*StorageUsageResp) XXX_DiscardUnknown added in v1.0.1

func (m *StorageUsageResp) XXX_DiscardUnknown()

func (*StorageUsageResp) XXX_Marshal added in v1.0.1

func (m *StorageUsageResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StorageUsageResp) XXX_Merge added in v1.0.1

func (m *StorageUsageResp) XXX_Merge(src proto.Message)

func (*StorageUsageResp) XXX_Size added in v1.0.1

func (m *StorageUsageResp) XXX_Size() int

func (*StorageUsageResp) XXX_Unmarshal added in v1.0.1

func (m *StorageUsageResp) XXX_Unmarshal(b []byte) error

type StorageUsageResp_V0 added in v1.1.1

type StorageUsageResp_V0 struct {
	Succeed      bool
	CkpEntries   []*CkpMetaInfo
	BlockEntries []*BlockMetaInfo
}

func (*StorageUsageResp_V0) Descriptor added in v1.1.1

func (*StorageUsageResp_V0) Descriptor() ([]byte, []int)

func (*StorageUsageResp_V0) GetBlockEntries added in v1.1.1

func (m *StorageUsageResp_V0) GetBlockEntries() []*BlockMetaInfo

func (*StorageUsageResp_V0) GetCkpEntries added in v1.1.1

func (m *StorageUsageResp_V0) GetCkpEntries() []*CkpMetaInfo

func (*StorageUsageResp_V0) GetSucceed added in v1.1.1

func (m *StorageUsageResp_V0) GetSucceed() bool

func (*StorageUsageResp_V0) Marshal added in v1.1.1

func (m *StorageUsageResp_V0) Marshal() (dAtA []byte, err error)

func (*StorageUsageResp_V0) MarshalTo added in v1.1.1

func (m *StorageUsageResp_V0) MarshalTo(dAtA []byte) (int, error)

func (*StorageUsageResp_V0) MarshalToSizedBuffer added in v1.1.1

func (m *StorageUsageResp_V0) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*StorageUsageResp_V0) ProtoMessage added in v1.1.1

func (*StorageUsageResp_V0) ProtoMessage()

func (*StorageUsageResp_V0) ProtoSize added in v1.1.1

func (m *StorageUsageResp_V0) ProtoSize() (n int)

func (*StorageUsageResp_V0) Reset added in v1.1.1

func (m *StorageUsageResp_V0) Reset()

func (*StorageUsageResp_V0) String added in v1.1.1

func (m *StorageUsageResp_V0) String() string

func (*StorageUsageResp_V0) Unmarshal added in v1.1.1

func (m *StorageUsageResp_V0) Unmarshal(dAtA []byte) error

func (*StorageUsageResp_V0) XXX_DiscardUnknown added in v1.1.1

func (m *StorageUsageResp_V0) XXX_DiscardUnknown()

func (*StorageUsageResp_V0) XXX_Marshal added in v1.1.1

func (m *StorageUsageResp_V0) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StorageUsageResp_V0) XXX_Merge added in v1.1.1

func (m *StorageUsageResp_V0) XXX_Merge(src proto.Message)

func (*StorageUsageResp_V0) XXX_Size added in v1.1.1

func (m *StorageUsageResp_V0) XXX_Size() int

func (*StorageUsageResp_V0) XXX_Unmarshal added in v1.1.1

func (m *StorageUsageResp_V0) XXX_Unmarshal(b []byte) error

type TraceSpan added in v1.0.0

type TraceSpan struct {
	Cmd       string
	Spans     string
	Threshold int64
}

func (*TraceSpan) Descriptor added in v1.0.0

func (*TraceSpan) Descriptor() ([]byte, []int)

func (*TraceSpan) GetCmd added in v1.0.0

func (m *TraceSpan) GetCmd() string

func (*TraceSpan) GetSpans added in v1.0.0

func (m *TraceSpan) GetSpans() string

func (*TraceSpan) GetThreshold added in v1.0.0

func (m *TraceSpan) GetThreshold() int64

func (*TraceSpan) Marshal added in v1.0.0

func (m *TraceSpan) Marshal() (dAtA []byte, err error)

func (*TraceSpan) MarshalBinary added in v1.0.0

func (t *TraceSpan) MarshalBinary() ([]byte, error)

func (*TraceSpan) MarshalTo added in v1.0.0

func (m *TraceSpan) MarshalTo(dAtA []byte) (int, error)

func (*TraceSpan) MarshalToSizedBuffer added in v1.0.0

func (m *TraceSpan) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TraceSpan) ProtoMessage added in v1.0.0

func (*TraceSpan) ProtoMessage()

func (*TraceSpan) ProtoSize added in v1.0.0

func (m *TraceSpan) ProtoSize() (n int)

func (*TraceSpan) Reset added in v1.0.0

func (m *TraceSpan) Reset()

func (*TraceSpan) String added in v1.0.0

func (m *TraceSpan) String() string

func (*TraceSpan) Unmarshal added in v1.0.0

func (m *TraceSpan) Unmarshal(dAtA []byte) error

func (*TraceSpan) UnmarshalBinary added in v1.0.0

func (t *TraceSpan) UnmarshalBinary(data []byte) error

func (*TraceSpan) XXX_DiscardUnknown added in v1.0.0

func (m *TraceSpan) XXX_DiscardUnknown()

func (*TraceSpan) XXX_Marshal added in v1.0.0

func (m *TraceSpan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TraceSpan) XXX_Merge added in v1.0.0

func (m *TraceSpan) XXX_Merge(src proto.Message)

func (*TraceSpan) XXX_Size added in v1.0.0

func (m *TraceSpan) XXX_Size() int

func (*TraceSpan) XXX_Unmarshal added in v1.0.0

func (m *TraceSpan) XXX_Unmarshal(b []byte) error

type WriteReq added in v0.6.0

type WriteReq struct {
	Type         EntryType
	DatabaseId   uint64
	TableID      uint64
	DatabaseName string
	TableName    string
	Schema       *catalog2.Schema
	Batch        *batch.Batch
	//[IncrementalDedup|FullSkipWorkspaceDedup|FullDedup], default is IncrementalDedup.
	//If incremental-dedup in dn.toml is false, IncrementalDedup will be treated as FullSkipWorkspaceDedup.
	//IncrementalDedup do not check uniqueness of PK before txn's snapshot TS.
	//FullSkipWorkspaceDedup do not check uniqueness of PK against txn's workspace.
	PkCheck PKCheckType
	//S3 object file name
	FileName string
	MetaLocs []string
	//for delete on S3
	DeltaLocs []string
	//tasks for loading primary keys or deleted row ids
	Jobs []*tasks.Job
	//loaded sorted primary keys or deleted row ids.
	JobRes []*tasks.JobResult
	//load context cancel function
	Cancel context.CancelFunc
}

writeReq responds to entry

Directories

Path Synopsis
test

Jump to

Keyboard shortcuts

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