db

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 42 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)

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 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
}

func (*Checkpoint) Descriptor added in v0.8.0

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

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 CreateDatabaseReq added in v0.6.0

type CreateDatabaseReq struct {
	AccessInfo AccessInfo
	Name       string
	CreateSql  string
	DatTyp     string
	//Global unique, allocated by CN .
	DatabaseId uint64
}

func (*CreateDatabaseReq) Descriptor added in v0.8.0

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

func (*CreateDatabaseReq) GetAccessInfo added in v0.8.0

func (m *CreateDatabaseReq) GetAccessInfo() AccessInfo

func (*CreateDatabaseReq) GetCreateSql added in v0.8.0

func (m *CreateDatabaseReq) GetCreateSql() string

func (*CreateDatabaseReq) GetDatabaseId added in v0.8.0

func (m *CreateDatabaseReq) GetDatabaseId() uint64

func (*CreateDatabaseReq) GetName added in v0.8.0

func (m *CreateDatabaseReq) GetName() string

func (*CreateDatabaseReq) Marshal added in v0.8.0

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

func (*CreateDatabaseReq) MarshalTo added in v0.8.0

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

func (*CreateDatabaseReq) MarshalToSizedBuffer added in v0.8.0

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

func (*CreateDatabaseReq) ProtoMessage added in v0.8.0

func (*CreateDatabaseReq) ProtoMessage()

func (*CreateDatabaseReq) ProtoSize added in v0.8.0

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

func (*CreateDatabaseReq) Reset added in v0.8.0

func (m *CreateDatabaseReq) Reset()

func (*CreateDatabaseReq) String added in v0.8.0

func (m *CreateDatabaseReq) String() string

func (*CreateDatabaseReq) Unmarshal added in v0.8.0

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

func (*CreateDatabaseReq) XXX_DiscardUnknown added in v0.8.0

func (m *CreateDatabaseReq) XXX_DiscardUnknown()

func (*CreateDatabaseReq) XXX_Marshal added in v0.8.0

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

func (*CreateDatabaseReq) XXX_Merge added in v0.8.0

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

func (*CreateDatabaseReq) XXX_Size added in v0.8.0

func (m *CreateDatabaseReq) XXX_Size() int

func (*CreateDatabaseReq) XXX_Unmarshal added in v0.8.0

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

type CreateDatabaseResp added in v0.6.0

type CreateDatabaseResp struct {
	ID uint64
}

type CreateRelationReq added in v0.6.0

type CreateRelationReq struct {
	AccessInfo   AccessInfo
	DatabaseID   uint64
	DatabaseName string
	Name         string
	RelationId   uint64
	Type         RelationType
	Defs         []engine.TableDef
}

func (*CreateRelationReq) String added in v0.8.0

func (req *CreateRelationReq) String() string

type CreateRelationResp added in v0.6.0

type CreateRelationResp struct {
	ID uint64
}

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

	Closed *atomic.Value
}

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) 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) 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) StartTxnWithLatestTS added in v0.8.0

func (db *DB) StartTxnWithLatestTS(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 DropDatabaseReq added in v0.6.0

type DropDatabaseReq struct {
	Name string
	ID   uint64
}

type DropDatabaseResp added in v0.6.0

type DropDatabaseResp struct {
	ID uint64
}

type DropOrTruncateRelationReq added in v0.6.0

type DropOrTruncateRelationReq struct {
	IsDrop       bool
	DatabaseID   uint64
	DatabaseName string
	Name         string
	ID           uint64
	NewId        uint64
}

type DropOrTruncateRelationResp added in v0.6.0

type DropOrTruncateRelationResp struct {
}

type EntryType added in v0.6.0

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

type ErrHandler

type ErrHandler interface {
	OnBlockErr(entry *catalog.BlockEntry, err error) error
	OnSegmentErr(entry *catalog.SegmentEntry, 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 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(id uint64, c any)

func (*MergeTaskBuilder) GetPolicy added in v1.0.0

func (s *MergeTaskBuilder) GetPolicy(id uint64) any

func (*MergeTaskBuilder) ManuallyMerge added in v1.0.0

func (s *MergeTaskBuilder) ManuallyMerge(entry *catalog.TableEntry, segs []*catalog.SegmentEntry) error

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) OnBlockErr

func (h *NoopErrHandler) OnBlockErr(entry *catalog.BlockEntry, err error) error

func (*NoopErrHandler) OnDatabaseErr

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

func (*NoopErrHandler) OnSegmentErr

func (h *NoopErrHandler) OnSegmentErr(entry *catalog.SegmentEntry, 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 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 UpdateConstraintReq added in v0.7.0

type UpdateConstraintReq struct {
	TableId      uint64
	TableName    string
	DatabaseId   uint64
	DatabaseName string
	Constraint   []byte
}

type UpdateConstraintResp added in v0.7.0

type UpdateConstraintResp struct{}

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

type WriteResp added in v0.6.0

type WriteResp struct {
}

Directories

Path Synopsis
test

Jump to

Keyboard shortcuts

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