Documentation ¶
Index ¶
- func ScanObjectsLSM(store *lsmkv.Store, pointers []uint64, scan ObjectScanFn, properties []string) error
- type InMemDeletedTracker
- func (t *InMemDeletedTracker) Add(id uint64)
- func (t *InMemDeletedTracker) BulkAdd(ids []uint64)
- func (t *InMemDeletedTracker) BulkRemove(ids []uint64)
- func (t *InMemDeletedTracker) Contains(id uint64) bool
- func (t *InMemDeletedTracker) GetAll() []uint64
- func (t *InMemDeletedTracker) Remove(id uint64)
- type ObjectScanFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScanObjectsLSM ¶
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 ¶
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