mvcc

package
v0.10.3-0...-aba39ff Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MVCCManager

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

MVCCManager is the manager that manages all the mvcc state of one wal. It keeps the last confirmed timestamp as mvcc of one pchannel and maximum timetick persisted into the wal of each vchannel.

func NewMVCCManager

func NewMVCCManager(lastConfirmedTimeTick uint64) *MVCCManager

NewMVCCManager creates a new mvcc timestamp manager.

func (*MVCCManager) GetMVCCOfVChannel

func (cm *MVCCManager) GetMVCCOfVChannel(vchannel string) VChannelMVCC

GetMVCCOfVChannel gets the mvcc of the vchannel.

func (*MVCCManager) UpdateMVCC

func (cm *MVCCManager) UpdateMVCC(msg message.MutableMessage)

UpdateMVCC updates the mvcc state by incoming message.

type VChannelMVCC

type VChannelMVCC struct {
	Timetick  uint64 // the timetick of the mvcc.
	Confirmed bool   // the mvcc is confirmed by the timeticksync operation.
}

VChannelMVCC is a mvcc of one vchannel which is used to identify the maximum timetick that is persisted into the wal of one vchannel. The state of mvcc that is confirmed if the timetick is synced by timeticksync message, otherwise, the mvcc is not confirmed.

Jump to

Keyboard shortcuts

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