indexcheckpoint

package
v0.0.0-...-f09cf9b Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checkpoints

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

Checkpoints keeps track of the last indexed vector id for each shard. It stores the ids in a BoltDB file.

func New

func New(dir string, logger logrus.FieldLogger) (*Checkpoints, error)

func (*Checkpoints) Close

func (c *Checkpoints) Close()

Close the underlying DB

func (*Checkpoints) Delete

func (c *Checkpoints) Delete(shardID, targetVector string) error

func (*Checkpoints) DeleteShard

func (c *Checkpoints) DeleteShard(shardID string) error

DeleteShard removes all checkpoints for a shard. It works for both single and multi vector shards.

func (*Checkpoints) Drop

func (c *Checkpoints) Drop() error

func (*Checkpoints) Filename

func (c *Checkpoints) Filename() string

func (*Checkpoints) Get

func (c *Checkpoints) Get(shardID, targetVector string) (count uint64, exists bool, err error)

func (*Checkpoints) Update

func (c *Checkpoints) Update(shardID, targetVector string, id uint64) error

func (*Checkpoints) UpdateIfNewer

func (c *Checkpoints) UpdateIfNewer(shardID, targetVector string, id uint64) error

Jump to

Keyboard shortcuts

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