updates

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: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IOET_WALTxnCommand_AppendNode          uint16 = 3004
	IOET_WALTxnCommand_PersistedDeleteNode uint16 = 3013

	IOET_WALTxnCommand_AppendNode_V1 uint16 = 1

	IOET_WALTxnCommand_AppendNode_CurrVer = IOET_WALTxnCommand_AppendNode_V1
)

Variables

This section is empty.

Functions

func CompareAppendNode added in v0.6.0

func CompareAppendNode(e, o *AppendNode) int

func MockTxnWithStartTS added in v0.8.0

func MockTxnWithStartTS(ts types.TS) *txnbase.Txn

Types

type AppendMVCCHandle added in v1.2.0

type AppendMVCCHandle struct {
	*sync.RWMutex
	// contains filtered or unexported fields
}

func NewAppendMVCCHandle added in v1.2.0

func NewAppendMVCCHandle(meta *catalog.ObjectEntry) *AppendMVCCHandle

func (*AppendMVCCHandle) AddAppendNodeLocked added in v1.2.0

func (n *AppendMVCCHandle) AddAppendNodeLocked(
	txn txnif.AsyncTxn,
	startRow uint32,
	maxRow uint32,
) (an *AppendNode, created bool)

AddAppendNodeLocked add a new appendnode to the list.

func (*AppendMVCCHandle) AllAppendsCommittedBeforeLocked

func (n *AppendMVCCHandle) AllAppendsCommittedBeforeLocked(ts types.TS) bool

AllAppendsCommittedBefore returns true if all appendnode is committed before ts.

func (*AppendMVCCHandle) CollectAppendLocked added in v1.2.0

func (n *AppendMVCCHandle) CollectAppendLocked(
	start, end types.TS, mp *mpool.MPool,
) (
	minRow, maxRow uint32,
	commitTSVec, abortVec containers.Vector,
	aborts *nulls.Bitmap,
)

it collects all append nodes in the range [start, end] minRow: is the min row maxRow: is the max row commitTSVec: is the commit ts vector abortVec: is the abort vector aborts: is the aborted bitmap If checkCommit, it ignore all uncommitted nodes

func (*AppendMVCCHandle) CollectUncommittedANodesPreparedBeforeLocked

func (n *AppendMVCCHandle) CollectUncommittedANodesPreparedBeforeLocked(
	ts types.TS,
	foreachFn func(*AppendNode),
) (anyWaitable bool)

it collects all append nodes that are prepared before the given ts foreachFn is called for each append node that is prepared before the given ts

func (*AppendMVCCHandle) DeleteAppendNodeLocked added in v1.2.0

func (n *AppendMVCCHandle) DeleteAppendNodeLocked(node *AppendNode)

DeleteAppendNodeLocked deletes the appendnode from the append list. it is called when txn of the appendnode is aborted.

func (*AppendMVCCHandle) EstimateMemSizeLocked added in v1.2.0

func (n *AppendMVCCHandle) EstimateMemSizeLocked() int

func (*AppendMVCCHandle) FillInCommitTSVecLocked

func (n *AppendMVCCHandle) FillInCommitTSVecLocked(commitTSVec containers.Vector, maxrow uint32, mp *mpool.MPool)

func (*AppendMVCCHandle) GetAppendListener added in v1.2.0

func (n *AppendMVCCHandle) GetAppendListener() func(txnif.AppendNode) error

func (*AppendMVCCHandle) GetAppendNodeByRowLocked

func (n *AppendMVCCHandle) GetAppendNodeByRowLocked(row uint32) (an *AppendNode)

only for internal usage given a row, it returns the append node which contains the row

func (*AppendMVCCHandle) GetCommitTSVecInRange

func (n *AppendMVCCHandle) GetCommitTSVecInRange(start, end types.TS, mp *mpool.MPool) containers.Vector

func (*AppendMVCCHandle) GetID added in v1.2.0

func (n *AppendMVCCHandle) GetID() *common.ID

func (*AppendMVCCHandle) GetLatestAppendPrepareTSLocked added in v1.2.0

func (n *AppendMVCCHandle) GetLatestAppendPrepareTSLocked() types.TS

func (*AppendMVCCHandle) GetMaxRowByTSLocked

func (n *AppendMVCCHandle) GetMaxRowByTSLocked(ts types.TS) uint32

func (*AppendMVCCHandle) GetMeta

func (n *AppendMVCCHandle) GetMeta() *catalog.ObjectEntry

func (*AppendMVCCHandle) GetTotalRow added in v1.2.0

func (n *AppendMVCCHandle) GetTotalRow() uint32

GetTotalRow is only for replay

func (*AppendMVCCHandle) GetVisibleRowLocked added in v1.2.0

func (n *AppendMVCCHandle) GetVisibleRowLocked(
	ctx context.Context,
	txn txnif.TxnReader,
) (maxrow uint32, visible bool, holes *nulls.Bitmap, err error)

it is used to get the visible max row for a txn maxrow: is the max row that the txn can see visible: is true if the txn can see any row holes: is the bitmap of the holes that the txn cannot see holes exists only if any append node was rollbacked

func (*AppendMVCCHandle) OnReplayAppendNode added in v1.2.0

func (n *AppendMVCCHandle) OnReplayAppendNode(an *AppendNode)

func (*AppendMVCCHandle) PrepareCompact added in v1.2.0

func (n *AppendMVCCHandle) PrepareCompact() bool

func (*AppendMVCCHandle) PrepareCompactLocked added in v1.2.0

func (n *AppendMVCCHandle) PrepareCompactLocked() bool

Reschedule until all appendnode is committed. Pending appendnode is not visible for compaction txn.

func (*AppendMVCCHandle) ReleaseAppends added in v1.2.0

func (n *AppendMVCCHandle) ReleaseAppends()

NOTE: after this call all appends related APIs should not be called ReleaseAppends release all append nodes. it is only called when the appendable block is persisted and the memory node is released

func (*AppendMVCCHandle) SetAppendListener added in v1.2.0

func (n *AppendMVCCHandle) SetAppendListener(l func(txnif.AppendNode) error)

func (*AppendMVCCHandle) StringLocked added in v1.2.0

func (n *AppendMVCCHandle) StringLocked() string

type AppendNode

type AppendNode struct {
	*txnbase.TxnMVCCNode

	NodeType handle.DeleteType
	// contains filtered or unexported fields
}

func MockAppendNode

func MockAppendNode(ts types.TS, startRow, maxRow uint32, mvcc *AppendMVCCHandle) *AppendNode

func NewAppendNode

func NewAppendNode(
	txn txnif.AsyncTxn,
	startRow, maxRow uint32,
	isTombstone bool,
	mvcc *AppendMVCCHandle) *AppendNode

func NewEmptyAppendNode added in v0.6.0

func NewEmptyAppendNode() *AppendNode

func (*AppendNode) ApplyCommit

func (node *AppendNode) ApplyCommit(id string) error

func (*AppendNode) ApplyRollback

func (node *AppendNode) ApplyRollback() (err error)

func (*AppendNode) CloneAll added in v0.6.0

func (node *AppendNode) CloneAll() *AppendNode

func (*AppendNode) CloneData added in v0.6.0

func (node *AppendNode) CloneData() *AppendNode

func (*AppendNode) GeneralDesc

func (node *AppendNode) GeneralDesc() string

func (*AppendNode) GeneralString

func (node *AppendNode) GeneralString() string

func (*AppendNode) GeneralVerboseString

func (node *AppendNode) GeneralVerboseString() string

func (*AppendNode) GetCommitTS

func (node *AppendNode) GetCommitTS() types.TS

func (*AppendNode) GetID

func (node *AppendNode) GetID() *common.ID

func (*AppendNode) GetMaxRow

func (node *AppendNode) GetMaxRow() uint32

func (*AppendNode) GetStartRow added in v0.6.0

func (node *AppendNode) GetStartRow() uint32

func (*AppendNode) IsMergeCompact

func (node *AppendNode) IsMergeCompact() bool

func (*AppendNode) IsNil added in v0.8.0

func (node *AppendNode) IsNil() bool

func (*AppendNode) IsTombstone

func (node *AppendNode) IsTombstone() bool

func (*AppendNode) MakeCommand

func (node *AppendNode) MakeCommand(id uint32) (cmd txnif.TxnCmd, err error)

func (*AppendNode) PrepareCommit

func (node *AppendNode) PrepareCommit() error

func (*AppendNode) PrepareRollback

func (node *AppendNode) PrepareRollback() (err error)

func (*AppendNode) ReadFrom

func (node *AppendNode) ReadFrom(r io.Reader) (n int64, err error)

func (*AppendNode) SetIsMergeCompact

func (node *AppendNode) SetIsMergeCompact()

func (*AppendNode) SetMaxRow

func (node *AppendNode) SetMaxRow(row uint32)

func (*AppendNode) String added in v0.6.0

func (node *AppendNode) String() string

func (*AppendNode) Update added in v0.6.0

func (node *AppendNode) Update(*AppendNode)

func (*AppendNode) WriteTo

func (node *AppendNode) WriteTo(w io.Writer) (n int64, err error)

type UpdateCmd

type UpdateCmd struct {
	*txnbase.BaseCustomizedCmd
	// contains filtered or unexported fields
}

func NewAppendCmd

func NewAppendCmd(id uint32, app *AppendNode) *UpdateCmd

func NewEmptyCmd

func NewEmptyCmd(cmdType uint16, version uint16) *UpdateCmd

func (*UpdateCmd) ApplyCommit added in v0.6.0

func (c *UpdateCmd) ApplyCommit()

func (*UpdateCmd) ApplyRollback added in v0.6.0

func (c *UpdateCmd) ApplyRollback()

func (*UpdateCmd) ApproxSize

func (c *UpdateCmd) ApproxSize() int64

func (*UpdateCmd) Desc

func (c *UpdateCmd) Desc() string

func (*UpdateCmd) GetAppendNode

func (c *UpdateCmd) GetAppendNode() *AppendNode

func (*UpdateCmd) GetCurrentVersion added in v0.8.0

func (c *UpdateCmd) GetCurrentVersion() uint16

func (*UpdateCmd) GetDest

func (c *UpdateCmd) GetDest() *common.ID

func (*UpdateCmd) GetType

func (c *UpdateCmd) GetType() uint16

func (*UpdateCmd) MarshalBinary added in v0.8.0

func (c *UpdateCmd) MarshalBinary() (buf []byte, err error)

func (*UpdateCmd) MarshalBinaryWithBuffer

func (c *UpdateCmd) MarshalBinaryWithBuffer(buf *bytes.Buffer) error

func (*UpdateCmd) ReadFrom

func (c *UpdateCmd) ReadFrom(r io.Reader) (n int64, err error)

func (*UpdateCmd) SetReplayTxn added in v0.6.0

func (c *UpdateCmd) SetReplayTxn(txn txnif.AsyncTxn)

func (*UpdateCmd) String

func (c *UpdateCmd) String() string

func (*UpdateCmd) UnmarshalBinary added in v0.8.0

func (c *UpdateCmd) UnmarshalBinary(buf []byte) error

func (*UpdateCmd) VerboseString

func (c *UpdateCmd) VerboseString() string

func (*UpdateCmd) WriteTo

func (c *UpdateCmd) WriteTo(w io.Writer) (n int64, err error)

Jump to

Keyboard shortcuts

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