docid

package
v1.17.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScanObjectsLSM added in v1.5.0

func ScanObjectsLSM(store *lsmkv.Store, pointers []uint64, scan ObjectScanFn, properties []string) error

ScanObjectsLSM calls the provided scanFn on each object for the specified pointer. If a pointer does not resolve to an object-id, the item will be skipped. The number of times scanFn is called can therefore be smaller than the input length of pointers.

Types

type InMemDeletedTracker

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

func NewInMemDeletedTracker

func NewInMemDeletedTracker() *InMemDeletedTracker

func (*InMemDeletedTracker) Add

func (t *InMemDeletedTracker) Add(id uint64)

Add is a thread-safe way to add a single deleted DocIDs

func (*InMemDeletedTracker) BulkAdd

func (t *InMemDeletedTracker) BulkAdd(ids []uint64)

BulkAdd is a thread safe way to add multiple DocIDs, it looks only once for the entire duration of the import

func (*InMemDeletedTracker) BulkRemove

func (t *InMemDeletedTracker) BulkRemove(ids []uint64)

BulkRemove is a thread-safe way to remove multiple ids, it locks only once, for the entire duration of the deletion

func (*InMemDeletedTracker) Contains

func (t *InMemDeletedTracker) Contains(id uint64) bool

Contains is a thread-safe way to check if an ID is contained in the deleted tracker, it uses "only" a ReadLock, so concurrent reads are possible.

func (*InMemDeletedTracker) GetAll

func (t *InMemDeletedTracker) GetAll() []uint64

GetAll is a thread-safe way to retrieve all entries, it uses a ReadLock for concurrent reading

func (*InMemDeletedTracker) Remove

func (t *InMemDeletedTracker) Remove(id uint64)

Remove is a thread-safe way to remove a single deleted DocIDs (e.g. because it has been ultimately cleaned up)

type ObjectScanFn

type ObjectScanFn func(prop *models.PropertySchema, docID uint64) (bool, error)

ObjectScanFn is called once per object, if false or an error is returned, the scanning will stop

Jump to

Keyboard shortcuts

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