Documentation
¶
Index ¶
- Constants
- func CompareAppendNode(e, o *AppendNode) int
- func MockTxnWithStartTS(ts types.TS) *txnbase.Txn
- type AppendMVCCHandle
- func (n *AppendMVCCHandle) AddAppendNodeLocked(txn txnif.AsyncTxn, startRow uint32, maxRow uint32) (an *AppendNode, created bool)
- func (n *AppendMVCCHandle) AllAppendsCommittedBeforeLocked(ts types.TS) bool
- func (n *AppendMVCCHandle) CollectAppendLocked(start, end types.TS, mp *mpool.MPool) (minRow, maxRow uint32, commitTSVec, abortVec containers.Vector, ...)
- func (n *AppendMVCCHandle) CollectUncommittedANodesPreparedBeforeLocked(ts types.TS, foreachFn func(*AppendNode)) (anyWaitable bool)
- func (n *AppendMVCCHandle) DeleteAppendNodeLocked(node *AppendNode)
- func (n *AppendMVCCHandle) EstimateMemSizeLocked() int
- func (n *AppendMVCCHandle) FillInCommitTSVecLocked(commitTSVec containers.Vector, maxrow uint32, mp *mpool.MPool)
- func (n *AppendMVCCHandle) GetAppendListener() func(txnif.AppendNode) error
- func (n *AppendMVCCHandle) GetAppendNodeByRowLocked(row uint32) (an *AppendNode)
- func (n *AppendMVCCHandle) GetCommitTSVecInRange(start, end types.TS, mp *mpool.MPool) containers.Vector
- func (n *AppendMVCCHandle) GetID() *common.ID
- func (n *AppendMVCCHandle) GetLatestAppendPrepareTSLocked() types.TS
- func (n *AppendMVCCHandle) GetMaxRowByTSLocked(ts types.TS) uint32
- func (n *AppendMVCCHandle) GetMeta() *catalog.ObjectEntry
- func (n *AppendMVCCHandle) GetTotalRow() uint32
- func (n *AppendMVCCHandle) GetVisibleRowLocked(ctx context.Context, txn txnif.TxnReader) (maxrow uint32, visible bool, holes *nulls.Bitmap, err error)
- func (n *AppendMVCCHandle) OnReplayAppendNode(an *AppendNode)
- func (n *AppendMVCCHandle) PrepareCompact() bool
- func (n *AppendMVCCHandle) PrepareCompactLocked() bool
- func (n *AppendMVCCHandle) ReleaseAppends()
- func (n *AppendMVCCHandle) SetAppendListener(l func(txnif.AppendNode) error)
- func (n *AppendMVCCHandle) StringLocked() string
- type AppendNode
- func (node *AppendNode) ApplyCommit(id string) error
- func (node *AppendNode) ApplyRollback() (err error)
- func (node *AppendNode) CloneAll() *AppendNode
- func (node *AppendNode) CloneData() *AppendNode
- func (node *AppendNode) GeneralDesc() string
- func (node *AppendNode) GeneralString() string
- func (node *AppendNode) GeneralVerboseString() string
- func (node *AppendNode) GetCommitTS() types.TS
- func (node *AppendNode) GetID() *common.ID
- func (node *AppendNode) GetMaxRow() uint32
- func (node *AppendNode) GetStartRow() uint32
- func (node *AppendNode) IsMergeCompact() bool
- func (node *AppendNode) IsNil() bool
- func (node *AppendNode) IsTombstone() bool
- func (node *AppendNode) MakeCommand(id uint32) (cmd txnif.TxnCmd, err error)
- func (node *AppendNode) PrepareCommit() error
- func (node *AppendNode) PrepareRollback() (err error)
- func (node *AppendNode) ReadFrom(r io.Reader) (n int64, err error)
- func (node *AppendNode) SetIsMergeCompact()
- func (node *AppendNode) SetMaxRow(row uint32)
- func (node *AppendNode) String() string
- func (node *AppendNode) Update(*AppendNode)
- func (node *AppendNode) WriteTo(w io.Writer) (n int64, err error)
- type UpdateCmd
- func (c *UpdateCmd) ApplyCommit()
- func (c *UpdateCmd) ApplyRollback()
- func (c *UpdateCmd) ApproxSize() int64
- func (c *UpdateCmd) Desc() string
- func (c *UpdateCmd) GetAppendNode() *AppendNode
- func (c *UpdateCmd) GetCurrentVersion() uint16
- func (c *UpdateCmd) GetDest() *common.ID
- func (c *UpdateCmd) GetType() uint16
- func (c *UpdateCmd) MarshalBinary() (buf []byte, err error)
- func (c *UpdateCmd) MarshalBinaryWithBuffer(buf *bytes.Buffer) error
- func (c *UpdateCmd) ReadFrom(r io.Reader) (n int64, err error)
- func (c *UpdateCmd) SetReplayTxn(txn txnif.AsyncTxn)
- func (c *UpdateCmd) String() string
- func (c *UpdateCmd) UnmarshalBinary(buf []byte) error
- func (c *UpdateCmd) VerboseString() string
- func (c *UpdateCmd) WriteTo(w io.Writer) (n int64, err error)
Constants ¶
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
Types ¶
type AppendMVCCHandle ¶ added in v1.2.0
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) 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)
type UpdateCmd ¶
type UpdateCmd struct {
*txnbase.BaseCustomizedCmd
// contains filtered or unexported fields
}
func NewAppendCmd ¶
func NewAppendCmd(id uint32, app *AppendNode) *UpdateCmd
func NewEmptyCmd ¶
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 (*UpdateCmd) GetAppendNode ¶
func (c *UpdateCmd) GetAppendNode() *AppendNode