verify

package
v1.103.1-rc Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Error = errs.Class("verify")

Error is the default error class for the package.

Functions

This section is empty.

Types

type Chore

type Chore struct {
	Log *zap.Logger

	Config Config

	DB *metabase.DB
}

Chore runs different verifications on metabase loop.

func New

func New(log *zap.Logger, mdb *metabase.DB, config Config) *Chore

New creates new verification.

func (*Chore) RunOnce

func (chore *Chore) RunOnce(ctx context.Context) error

RunOnce creates a new rangedloop and runs the verifications.

type Config

type Config struct {
	ProgressPrintFrequency int64

	Loop rangedloop.Config
}

Config contains configuration for all the services.

type ProgressObserver

type ProgressObserver struct {
	Log *zap.Logger

	ProgressPrintFrequency int64
	RemoteSegmentCount     int64
	InlineSegmentCount     int64
	// contains filtered or unexported fields
}

ProgressObserver counts and prints progress of metabase loop.

func (*ProgressObserver) Finish added in v1.80.3

func (progress *ProgressObserver) Finish(context.Context) error

Finish is called after all segments are processed by all observers.

func (*ProgressObserver) Fork added in v1.80.3

Fork creates a Partial to process a chunk of all the segments. It is called after Start. It is not called concurrently.

func (*ProgressObserver) Join added in v1.80.3

Join is called for each partial returned by Fork.

func (*ProgressObserver) Process added in v1.80.3

func (progress *ProgressObserver) Process(ctx context.Context, segments []rangedloop.Segment) error

Process is called repeatedly with batches of segments.

func (*ProgressObserver) Report

func (progress *ProgressObserver) Report()

Report reports the current progress.

func (*ProgressObserver) Start added in v1.80.3

func (progress *ProgressObserver) Start(context.Context, time.Time) error

Start is called at the beginning of each segment loop.

type SegmentSizes

type SegmentSizes struct {
	Log *zap.Logger
	// contains filtered or unexported fields
}

SegmentSizes verifies segments table plain_offset and plain_size.

func (*SegmentSizes) Finish added in v1.80.3

func (verify *SegmentSizes) Finish(context.Context) error

Finish is called after all segments are processed by all observers.

func (*SegmentSizes) Fork added in v1.80.3

Fork creates a Partial to process a chunk of all the segments. It is called after Start. It is not called concurrently.

func (*SegmentSizes) Join added in v1.80.3

Join is called for each partial returned by Fork.

func (*SegmentSizes) Process added in v1.80.3

func (verify *SegmentSizes) Process(ctx context.Context, segments []rangedloop.Segment) error

Process is called repeatedly with batches of segments.

func (*SegmentSizes) Start added in v1.80.3

func (verify *SegmentSizes) Start(context.Context, time.Time) error

Start is called at the beginning of each segment loop.

Jump to

Keyboard shortcuts

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