Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GroupKey ¶
GroupKey returns a unique identifier for the group the block belongs to. It considers the downsampling resolution and the block's labels.
func IsHaltError ¶
IsHaltError returns true if the base error is a HaltError.
func IsRetryError ¶
IsRetryError returns true if the base error is a RetryError.
Types ¶
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
Group captures a set of blocks that have the same origin labels and downsampling resolution. Those blocks generally contain the same series and can thus efficiently be compacted.
func (*Group) Compact ¶
Compact plans and runs a single compaction against the group. The compacted result is uploaded into the bucket the blocks were retrieved from.
func (*Group) Resolution ¶
Resolution returns the common downsampling resolution of blocks in the group.
type HaltError ¶
type HaltError struct {
// contains filtered or unexported fields
}
HaltError is a type wrapper for errors that should halt any further progress on compactions.
type RetryError ¶
type RetryError struct {
// contains filtered or unexported fields
}
RetryError is a type wrapper for errors that should trigger warning log and retry whole compaction loop, but aborting current compaction further progress.
func (RetryError) Error ¶
func (e RetryError) Error() string
type Syncer ¶
type Syncer struct {
// contains filtered or unexported fields
}
Syncer syncronizes block metas from a bucket into a local directory. It sorts them into compaction groups based on equal label sets.
func NewSyncer ¶
func NewSyncer(logger log.Logger, reg prometheus.Registerer, bkt objstore.Bucket, syncDelay time.Duration) (*Syncer, error)
NewSyncer returns a new Syncer for the given Bucket and directory. Blocks must be at least as old as the sync delay for being considered.
func (*Syncer) GarbageBlocks ¶
func (*Syncer) GarbageCollect ¶
GarbageCollect deletes blocks from the bucket if their data is available as part of a block with a higher compaction level.