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)
}
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.
Click to show internal directories.
Click to hide internal directories.