commitlog

package
v1.19.11 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWriter

func NewWriter(w *os.File) *bufWriter

NewWriter returns a new Writer whose buffer has the default size.

func NewWriterSize

func NewWriterSize(w *os.File, size int) *bufWriter

NewWriterSize returns a new Writer whose buffer has at least the specified size. If the argument *os.File is already a Writer with large enough size, it returns the underlying Writer.

Types

type HnswCommitType

type HnswCommitType uint8 // 256 options, plenty of room for future extensions

TODO: these are duplicates with the hnsw package, unify them

const (
	AddNode HnswCommitType = iota
	SetEntryPointMaxLevel
	AddLinkAtLevel
	ReplaceLinksAtLevel
	AddTombstone
	RemoveTombstone
	ClearLinks
	DeleteNode
	ResetIndex
	ClearLinksAtLevel // added in v1.8.0-rc.1, see https://github.com/weaviate/weaviate/issues/1701
	AddLinksAtLevel   // added in v1.8.0-rc.1, see https://github.com/weaviate/weaviate/issues/1705
	AddPQ
)

TODO: these are duplicates with the hnsw package, unify them

type Logger

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

func NewLogger

func NewLogger(fileName string) *Logger

func NewLoggerWithFile

func NewLoggerWithFile(file *os.File) *Logger

func (*Logger) AddLinkAtLevel

func (l *Logger) AddLinkAtLevel(id uint64, level int, target uint64) error

func (*Logger) AddLinksAtLevel

func (l *Logger) AddLinksAtLevel(id uint64, level int, targets []uint64) error

func (*Logger) AddNode

func (l *Logger) AddNode(id uint64, level int) error

func (*Logger) AddPQ added in v1.18.0

func (l *Logger) AddPQ(data ssdhelpers.PQData) error

func (*Logger) AddTombstone

func (l *Logger) AddTombstone(id uint64) error
func (l *Logger) ClearLinks(id uint64) error

func (*Logger) ClearLinksAtLevel

func (l *Logger) ClearLinksAtLevel(id uint64, level uint16) error

func (*Logger) Close

func (l *Logger) Close() error

func (*Logger) DeleteNode

func (l *Logger) DeleteNode(id uint64) error

func (*Logger) FileName

func (l *Logger) FileName() (string, error)

func (*Logger) FileSize

func (l *Logger) FileSize() (int64, error)

func (*Logger) Flush

func (l *Logger) Flush() error

func (*Logger) RemoveTombstone

func (l *Logger) RemoveTombstone(id uint64) error

func (*Logger) ReplaceLinksAtLevel

func (l *Logger) ReplaceLinksAtLevel(id uint64, level int, targets []uint64) error

chunks links in increments of 8, so that we never have to allocate a dynamic []byte size which would be guaranteed to escape to the heap

func (*Logger) Reset

func (l *Logger) Reset() error

func (*Logger) SetEntryPointWithMaxLayer

func (l *Logger) SetEntryPointWithMaxLayer(id uint64, level int) error

Jump to

Keyboard shortcuts

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