compact

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deletes

func Deletes(ctx context.Context, l klevdb.Log, before time.Time) (map[int64]struct{}, int64, error)

Deletes tries to remove messages with nil value before given time. It will not remove messages for keys it sees before that offset.

This is similar to removing keys, which were deleted (e.g. value set to nil) and are therfore no longer relevant/active.

returns the offsets it deleted and the amount of storage freed

func DeletesMulti added in v0.9.0

func DeletesMulti(ctx context.Context, l klevdb.Log, before time.Time, backoff klevdb.DeleteMultiBackoff) (map[int64]struct{}, int64, error)

DeletesMulti is similar to Deletes, but will try to remove messages from multiple segments

func FindDeletes added in v0.3.0

func FindDeletes(ctx context.Context, l klevdb.Log, before time.Time) (map[int64]struct{}, error)

FindDeletes returns a set of offsets for messages with nil value for a given key, before a given time.

Messages that have a nil value are considered deletes for this key, and therefore eligible for deletion.

func FindUpdates added in v0.3.0

func FindUpdates(ctx context.Context, l klevdb.Log, before time.Time) (map[int64]struct{}, error)

FindUpdates returns a set of offsets for messages that have the same key further in the log, before a given time.

Messages before the last one for a given key are considered updates that are no longer relevant, and therefore are eligible for deletion.

func Updates

func Updates(ctx context.Context, l klevdb.Log, before time.Time) (map[int64]struct{}, int64, error)

Updates tries to remove messages before given time that are repeated further in the log leaving only the last message for a given key.

This is similar to removing the old value updates, leaving only the current value (last update) for a key.

returns the offsets it deleted and the amount of storage freed

func UpdatesMulti added in v0.9.0

func UpdatesMulti(ctx context.Context, l klevdb.Log, before time.Time, backoff klevdb.DeleteMultiBackoff) (map[int64]struct{}, int64, error)

UpdatesMulti is similar to Updates, but will try to remove messages from multiple segments

Types

This section is empty.

Jump to

Keyboard shortcuts

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