dbmeta

package
v0.0.0-...-9b3b26b Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileSize                 = 1024
	FieldUIntLenth           = 8
	FieldKeyUniqIdGap        = 10000
	RestartFieldKeyUniqIdGap = 1000000

	FieldUpdateOffset = 0

	FieldSnapshotOffset = 16
	FieldSnapshotLength = 16
	FieldSnapshotCount  = 1

	FieldMigrateOffset = 128

	FieldCompressTypeOffset = 256
	FieldDatabaseTypeOffset = 258
	FieldKeyUniqIdOffset    = 260
	FieldFlushIndexOffset   = 268
)
View Source
const MetaFileName = "BSMANIFEST"

Variables

This section is empty.

Functions

This section is empty.

Types

type Meta

type Meta struct {
	KeyId atomic.Uint64
	// contains filtered or unexported fields
}

func OpenMeta

func OpenMeta(dir string) (*Meta, error)

func (*Meta) Checkpoint

func (m *Meta) Checkpoint(dstDir string) error

func (*Meta) ClearSnapshot

func (m *Meta) ClearSnapshot()

func (*Meta) Close

func (m *Meta) Close()

func (*Meta) GetBitalosdbCompressTypeCfg

func (m *Meta) GetBitalosdbCompressTypeCfg() (isSet bool, t uint16)

func (*Meta) GetBitalosdbDatabaseTypeCfg

func (m *Meta) GetBitalosdbDatabaseTypeCfg() (isSet bool, t uint16)

func (*Meta) GetCurrentKeyUniqId

func (m *Meta) GetCurrentKeyUniqId() uint64

func (*Meta) GetDiskKeyUniqId

func (m *Meta) GetDiskKeyUniqId() uint64

func (*Meta) GetFlushIndex

func (m *Meta) GetFlushIndex() uint64

func (*Meta) GetMigrateSlotid

func (m *Meta) GetMigrateSlotid() uint64

func (*Meta) GetMigrateStatus

func (m *Meta) GetMigrateStatus() uint64

func (*Meta) GetNextKeyUniqId

func (m *Meta) GetNextKeyUniqId() uint64

func (*Meta) GetSnapshotIndex

func (m *Meta) GetSnapshotIndex() uint64

func (*Meta) GetSnapshotOrder

func (m *Meta) GetSnapshotOrder() uint64

func (*Meta) GetSnapshotStamp

func (m *Meta) GetSnapshotStamp() int64

func (*Meta) GetUpdateIndex

func (m *Meta) GetUpdateIndex() uint64

func (*Meta) InitKeyUniqId

func (m *Meta) InitKeyUniqId()

func (*Meta) RaftReset

func (m *Meta) RaftReset()

func (*Meta) SetBitalosdbCompressTypeCfg

func (m *Meta) SetBitalosdbCompressTypeCfg(t uint16)

func (*Meta) SetBitalosdbDatabaseTypeCfg

func (m *Meta) SetBitalosdbDatabaseTypeCfg(t uint16)

func (*Meta) SetFlushIndex

func (m *Meta) SetFlushIndex(idx uint64)

func (*Meta) SetMigrateSlotid

func (m *Meta) SetMigrateSlotid(u uint64)

func (*Meta) SetMigrateStatus

func (m *Meta) SetMigrateStatus(u uint64)

func (*Meta) SetSnapshotIndex

func (m *Meta) SetSnapshotIndex(u uint64) uint64

func (*Meta) SetUpdateIndex

func (m *Meta) SetUpdateIndex(u uint64)

Jump to

Keyboard shortcuts

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