From 3a02f12262ca7774f6a4901edd6018e6903747ad Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Tue, 2 Jul 2024 12:05:56 +0800 Subject: [PATCH] resource_control: add privilege requirement for dashboard capacity estimation (#18082) (#18088) --- dashboard/dashboard-resource-manager.md | 4 ++++ sql-statements/sql-statement-calibrate-resource.md | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dashboard/dashboard-resource-manager.md b/dashboard/dashboard-resource-manager.md index a2cb2c65b9119..cbf0658ebe766 100644 --- a/dashboard/dashboard-resource-manager.md +++ b/dashboard/dashboard-resource-manager.md @@ -63,6 +63,10 @@ Before resource planning, you need to know the overall capacity of the cluster. You can select an appropriate time range using **CPU Usage** in the [Metrics](#metrics) section. +> **Note:** +> +> To use the capacity estimation feature, the current login user must have the `SUPER` or `RESOURCE_GROUP_ADMIN` privilege and the `SELECT` privilege for some system tables. Before using this feature, ensure the current user has these privileges. Otherwise, some features might not work properly. For more information, see [`CALIBRATE RESOURCE`](/sql-statements/sql-statement-calibrate-resource.md#privileges). + ## Metrics By observing the metrics on the panels, you can understand the current overall resource consumption status of the cluster. The monitoring metrics and their meanings are as follows: diff --git a/sql-statements/sql-statement-calibrate-resource.md b/sql-statements/sql-statement-calibrate-resource.md index db8c8af8e7a1b..39188df63964d 100644 --- a/sql-statements/sql-statement-calibrate-resource.md +++ b/sql-statements/sql-statement-calibrate-resource.md @@ -28,7 +28,7 @@ To execute this command, make sure that the following requirements are met: - You have enabled [`tidb_enable_resource_control`](/system-variables.md#tidb_enable_resource_control-new-in-v660). - The user has `SUPER` or `RESOURCE_GROUP_ADMIN` privilege. -- The user has the `SELECT` privilege for all tables in the `METRICS_SCHEMA` schema. +- To [estimate capacity based on actual workload](#estimate-capacity-based-on-actual-workload), the user must have the `SELECT` privilege for all tables in the `METRICS_SCHEMA` schema. ## Methods for estimating capacity