deletebuffer

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

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

Go to latest
Published: Jan 25, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDeleteBuffer

func NewDeleteBuffer() *deleteBuffer

Types

type BufferItem

type BufferItem struct {
	PartitionID int64
	DeleteData  storage.DeleteData
}

func (*BufferItem) EntryNum

func (item *BufferItem) EntryNum() int64

func (*BufferItem) Size

func (item *BufferItem) Size() int64

type DeleteBuffer

type DeleteBuffer[T timed] interface {
	Put(T)
	ListAfter(uint64) []T
	SafeTs() uint64
	TryDiscard(uint64)
	// Size returns current size information of delete buffer: entryNum and memory
	Size() (entryNum, memorySize int64)

	// Register L0 segment
	RegisterL0(segments ...segments.Segment)
	// ListAll L0
	ListL0() []segments.Segment
	// Clean delete data, include l0 segment and delete buffer
	UnRegister(ts uint64)

	// clean up delete buffer
	Clear()

	// Pin/Unpin methods for protecting specific timestamps from cleanup
	Pin(ts uint64, segmentID int64)
	Unpin(ts uint64, segmentID int64)
}

DeleteBuffer is the interface for delete buffer.

func NewDoubleCacheDeleteBuffer

func NewDoubleCacheDeleteBuffer[T timed](startTs uint64, maxSize int64) DeleteBuffer[T]

func NewListDeleteBuffer

func NewListDeleteBuffer[T timed](startTs uint64, sizePerBlock int64, labels []string) DeleteBuffer[T]

type Item

type Item struct {
	Ts   uint64
	Data []BufferItem
}

Item wraps cache item as `timed`.

func (*Item) EntryNum

func (item *Item) EntryNum() int64

func (*Item) Size

func (item *Item) Size() int64

Size implements `timed`.

func (*Item) Timestamp

func (item *Item) Timestamp() uint64

Timestamp implements `timed`.

Jump to

Keyboard shortcuts

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