checkpointtool

package
v0.0.0-debug-20260702 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountInfo

type AccountInfo struct {
	AccountID   uint32
	TableCount  int
	ObjectCount int
	DataRanges  int
	TombRanges  int
}

AccountInfo contains account summary within checkpoint

type CheckpointInfo

type CheckpointInfo struct {
	Dir           string
	TotalEntries  int
	GlobalCount   int
	IncrCount     int
	CompactCount  int
	LatestTS      types.TS
	EarliestTS    types.TS
	TotalAccounts int
	TotalTables   int
}

CheckpointInfo contains checkpoint metadata summary

type CheckpointReader

type CheckpointReader struct {
	// contains filtered or unexported fields
}

CheckpointReader reads checkpoint data from a directory

func Open

func Open(ctx context.Context, dir string, opts ...Option) (*CheckpointReader, error)

Open opens checkpoint data from a directory

func (*CheckpointReader) Close

func (r *CheckpointReader) Close() error

Close releases resources

func (*CheckpointReader) ComposeAt

func (r *CheckpointReader) ComposeAt(ts types.TS) (*ComposedView, error)

ComposeAt creates a logical view at timestamp

func (*CheckpointReader) Dir

func (r *CheckpointReader) Dir() string

Dir returns the checkpoint directory

func (*CheckpointReader) Entries

Entries returns all checkpoint entries

func (*CheckpointReader) EntryInfo

func (r *CheckpointReader) EntryInfo(index int, e *checkpoint.CheckpointEntry) *EntryInfo

EntryInfo converts CheckpointEntry to EntryInfo

func (*CheckpointReader) GetAccounts

func (r *CheckpointReader) GetAccounts(entry *checkpoint.CheckpointEntry) ([]*AccountInfo, error)

GetAccounts extracts unique accounts from table ranges

func (*CheckpointReader) GetEntry

func (r *CheckpointReader) GetEntry(index int) (*checkpoint.CheckpointEntry, error)

GetEntry returns entry at index

func (*CheckpointReader) GetObjectEntries

func (r *CheckpointReader) GetObjectEntries(entry *checkpoint.CheckpointEntry, tableID uint64) ([]*ObjectEntryInfo, []*ObjectEntryInfo, error)

GetObjectEntries reads detailed object entries with timestamps for a table

func (*CheckpointReader) GetTableRanges

func (r *CheckpointReader) GetTableRanges(entry *checkpoint.CheckpointEntry) ([]ckputil.TableRange, error)

GetTableRanges reads table ranges from an entry

func (*CheckpointReader) GetTables

func (r *CheckpointReader) GetTables(entry *checkpoint.CheckpointEntry) ([]*TableInfo, error)

GetTables extracts tables from an entry

func (*CheckpointReader) GetTablesByAccount

func (r *CheckpointReader) GetTablesByAccount(entry *checkpoint.CheckpointEntry, accountID uint32) ([]*TableInfo, error)

GetTablesByAccount filters tables by account

func (*CheckpointReader) Info

func (r *CheckpointReader) Info() *CheckpointInfo

Info returns checkpoint summary

func (*CheckpointReader) ReadRangeData

func (r *CheckpointReader) ReadRangeData(entry *checkpoint.CheckpointEntry, rng ckputil.TableRange) ([]string, [][]string, error)

ReadRangeData reads actual data from a range and returns column names and row data as strings

func (*CheckpointReader) ReadTableData

func (r *CheckpointReader) ReadTableData(ctx context.Context, rng ckputil.TableRange) (*batch.Batch, func(), error)

ReadTableData reads actual data from a table range

type ComposedView

type ComposedView struct {
	Timestamp    types.TS
	BaseEntry    *EntryInfo
	Incrementals []*EntryInfo
	Tables       map[uint64]*TableInfo
}

ComposedView represents logical checkpoint view at a timestamp

type EntryInfo

type EntryInfo struct {
	Index            int
	Start            types.TS
	End              types.TS
	Type             checkpoint.EntryType
	State            checkpoint.State
	Version          uint32
	Location         string
	TNLocation       string
	TableIDLocations []string
	CKPLSN           uint64
	TruncLSN         uint64
}

EntryInfo is a simplified view of CheckpointEntry for display

type ObjectEntryInfo

type ObjectEntryInfo struct {
	Range      ckputil.TableRange
	CreateTime types.TS
	DeleteTime types.TS
}

ObjectEntryInfo contains detailed object entry information with timestamps

type Option

type Option func(*CheckpointReader)

Option configures CheckpointReader

func WithMPool

func WithMPool(mp *mpool.MPool) Option

WithMPool sets memory pool

type TableInfo

type TableInfo struct {
	TableID    uint64
	AccountID  uint32
	DatabaseID uint64
	DataRanges []ckputil.TableRange
	TombRanges []ckputil.TableRange
}

TableInfo contains table data within checkpoint

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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