resourcegroup

package
v1.1.0-beta.0...-51a1a4a Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultResourceGroupName = "default"

DefaultResourceGroupName is the default resource group name.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumptionReporter

type ConsumptionReporter interface {
	// ReportConsumption report the consumption directly, it's used at
	// scenarios that the `ResourceGroupKVInterceptor` is not available.
	ReportConsumption(resourceGroupName string, consumption *rmpb.Consumption)
	// ReportRUV2Consumption reports RU consumption through the legacy engine-slot API.
	ReportRUV2Consumption(resourceGroupName string, tikvRUV2, tidbRUV2, tiflashRUV2 float64)
}

ConsumptionReporter is used to report raw resource consumptions.

type RunawayChecker

type RunawayChecker interface {
	// BeforeExecutor checks whether query is in watch list before executing and after compiling.
	BeforeExecutor() (string, error)
	// BeforeCopRequest checks runaway and modifies the request if necessary before sending coprocessor request.
	BeforeCopRequest(req *tikvrpc.Request) error
	// CheckThresholds checks TiKV error whether it exceeds the threshold.
	CheckThresholds(ruDetail *util.RUDetails, processKeys int64, err error) error
	// ResetTotalProcessedKeys resets the current total processed keys.
	ResetTotalProcessedKeys()
	// CheckAction is used to check current action of the query.
	// It's safe to call this method concurrently.
	CheckAction() rmpb.RunawayAction
	// CheckRuleKillAction checks whether the query should be killed according to the group settings.
	CheckRuleKillAction() (string, bool)
}

RunawayChecker is used to check runaway queries.

Directories

Path Synopsis
Package ruv2 defines the raw units and weighting model used to calculate RU v3.
Package ruv2 defines the raw units and weighting model used to calculate RU v3.

Jump to

Keyboard shortcuts

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