etcdwal

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2025 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WalManager

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

func NewWalManager

func NewWalManager(walDir string, logger *zap.Logger) *WalManager

func (*WalManager) CreateWal

func (e *WalManager) CreateWal(metadata babuzapb.WalMetadata) (ibabuza.EntryStorage, ibabuza.Wal, error)

func (*WalManager) FindSnapshot

func (e *WalManager) FindSnapshot() ([]walpb.Snapshot, error)

func (*WalManager) HasExistingWals

func (e *WalManager) HasExistingWals() (bool, error)

func (*WalManager) PurgeWals

func (e *WalManager) PurgeWals(purgeCfg ibabuza.WalPurgeConfig)

StartWalPurgingProcess is to release the locks, which has smaller index than the given index except the largest one among them. For example, if WAL is holding lock 1,2,3,4,5,6, ReleaseLockTo(4) will release lock 1,2 but keep 3. ReleaseLockTo(5) will release 1,2,3 but keep 4.

func (*WalManager) ReplayWal

func (e *WalManager) ReplayWal(snapshot *raftpb.Snapshot, deleteUncommitted bool) (
	ibabuza.EntryStorage, ibabuza.Wal, ibabuza.ReplayWalResult, error)

type WalWrapper

type WalWrapper struct {
	*wal.WAL
}

func NewWalWrapper

func NewWalWrapper(w *wal.WAL) *WalWrapper

func (*WalWrapper) Purge

func (w *WalWrapper) Purge(snap raftpb.Snapshot) error

func (*WalWrapper) SaveSnapshot

func (w *WalWrapper) SaveSnapshot(snap raftpb.Snapshot) error

Jump to

Keyboard shortcuts

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