storage

package
v0.0.0-...-7fa48db Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SoftAppendErrorProcessor

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

SoftAppendErrorProcessor helps identify soft errors and run appropriate callbacks. This also helps keep the soft error checks consistent between ingesters and block builders by keeping it all in a single place.

func NewSoftAppendErrorProcessor

func NewSoftAppendErrorProcessor(
	commonCallback func(),
	errOutOfBounds func(int64, []mimirpb.LabelAdapter),
	errOutOfOrderSample func(int64, []mimirpb.LabelAdapter),
	errTooOldSample func(int64, []mimirpb.LabelAdapter),
	sampleTooFarInFuture func(int64, []mimirpb.LabelAdapter),
	errDuplicateSampleForTimestamp func(int64, []mimirpb.LabelAdapter),
	maxSeriesPerUser func(),
	maxSeriesPerMetric func(labels []mimirpb.LabelAdapter),
	errOOONativeHistogramsDisabled func(error, int64, []mimirpb.LabelAdapter),
	errHistogramCountMismatch func(error, int64, []mimirpb.LabelAdapter),
	errHistogramCountNotBigEnough func(error, int64, []mimirpb.LabelAdapter),
	errHistogramNegativeBucketCount func(error, int64, []mimirpb.LabelAdapter),
	errHistogramSpanNegativeOffset func(error, int64, []mimirpb.LabelAdapter),
	errHistogramSpansBucketsMismatch func(error, int64, []mimirpb.LabelAdapter),
) SoftAppendErrorProcessor

func (*SoftAppendErrorProcessor) ProcessErr

func (e *SoftAppendErrorProcessor) ProcessErr(err error, ts int64, labels []mimirpb.LabelAdapter) bool

ProcessErr returns true if the err is a soft append error and calls appropriate callback function. In case a soft error is encountered, we can continue ingesting other samples without aborting the whole request. ProcessErr always calls the commonCallback() if it exists. err must be non-nil.

Jump to

Keyboard shortcuts

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