Help us shape the future of Go! Take the 2026 Go Developer Survey

olapagg

package
v0.116.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Aggregates = []Aggregate{
	{
		Table: "v1_agg_task_statuses_minute_olap",
		// contains filtered or unexported fields
	},
	{
		Table: "v1_agg_task_events_minute_olap",
		// contains filtered or unexported fields
	},
	{
		Table: "v1_agg_events_minute_olap",
		// contains filtered or unexported fields
	},
}

Functions

func CompactionLockKey

func CompactionLockKey(aggregateTable string, partition int) int64

Types

type Aggregate

type Aggregate struct {
	// Table is the aggregate table, used to find its partitions.
	Table string
	// contains filtered or unexported fields
}

Aggregate is one aggregate table and the query that compacts its delta table.

type Aggregator

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

func New

func New(pool sqlchelpers.Pool, l *zerolog.Logger, opts Opts) *Aggregator

func (*Aggregator) Start

func (a *Aggregator) Start() func()

type Opts

type Opts struct {
	// BatchSize is the number of delta rows one compaction statement folds.
	BatchSize int

	// Partitions is the number of hash partitions of each delta table. Each partition has its
	// own compactor on every instance, and compactors of the same partition on different
	// instances skip each other's rows.
	Partitions int

	// PollInterval is how long a compactor waits after finding nothing to fold. Under load it
	// folds back to back, so this only bounds how long deltas wait when the system is idle.
	PollInterval time.Duration
}

func DefaultOpts

func DefaultOpts() Opts

Jump to

Keyboard shortcuts

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