tencent cloud

Creating Hot Spot Update Protection Task
Last updated: 2025-07-09 14:52:25
Creating Hot Spot Update Protection Task
Last updated: 2025-07-09 14:52:25
DBbrain provides the hot spot update protection feature. It significantly optimizes the performance of UPDATE operations for hot spot row data in scenarios with frequent updates or flash sales. When a hot spot update protection task is created, the system will automatically detect whether there are single-row hot spot updates. If there are, it will queue a large number of concurrent UPDATEs, reducing the performance degradation caused by a large number of row locks, and improving the database performance in high concurrency scenarios.
The hot spot update protection feature also supports viewing, closing, and deleting hot spot update protection tasks.

Supported Versions

MySQL: It only supports MySQL 5.7-20200930 and later versions and MySQL 8.0-20200830 and later versions.
TDSQL-C for MySQL: It only supports MySQL 5.7-2.1.8 and later versions, and MySQL 8.0-3.1.5 and later versions.

Use Limitations

If there is already a hot spot update protection task in the Running status, it is not allowed to create a task.

Directions

Creating Hot Spot Update Protection Task

1. Log in to the DBbrain console.
2. In the left sidebar, choose Diagnosis and Optimization.
3. At the top of the page, select the database type and instance ID, and select the Real-Time Session tab.
4. On the Real-Time Session page, select the Hot Spot Update Protection tab.
5. Click Create Task, configure task parameters as prompted on the page, and click OK after configuration.



The parameter description is shown in the following table.
Parameter
Description
Waiting Timeout Threshold
Value range: 1000 to 100000000.
It indicates the waiting time in the hot spot update protection queue.
When the set threshold is less than the maximum value of 100000000, if the waiting time in the hot spot update protection queue exceeds this threshold, the transaction will exit the hot spot update protection queue and follow the original row lock logic.
When the set threshold is the maximum value of 100000000, if the waiting time in the hot spot update protection queue exceeds this threshold, the transaction will always wait.
Execution Mode
It includes Scheduled stop and Manual stop.
Scheduled stop: After you select scheduled closure, you need to set the task execution time. The task will start executing upon submission and will automatically be closed when the execution time ends. The task can also be manually closed in the operation column of the task list during execution.
Manual stop: After you select manual closure, the task will continue to execute upon submission until it is manually closed in the operation column of the task list.

Viewing, Closing, and Deleting Hot Spot Update Protection Tasks

1. Enter the Hotspot Update Protection task list.



2. View, close, and delete hot spot update protection tasks.
The list parameter description is shown in the following table:
Parameter
Description
Status
It includes Running, Completed, and Terminated.
Running: The task is in progress.
Completed: The task with the execution method set to Automatic Closure will be automatically closed after the specified task execution time ends.
Terminated: There are two situations.
The task with the execution method set to Automatic Closure will be manually closed before the specified task execution time ends.
The task with the execution method set to Manual Closure will be manually closed.
Start Time
The time when the hot spot update protection task was created, which is the task start time.
Execution Time
The execution time of the task.
If the status is Completed or Terminated, it indicates the normal running time of the task.
If the status is Running, it indicates the executed time of the task.
Remaining Time
Remaining time for task execution.
When a task is created, the task execution time is Automatic Closure:
When the status is Running, Remaining Time = Execution Time (set when creating the task) - Execution Time (displayed in the task list).
If the status is Completed or Terminated, the remaining time is 0.
When a task is created, the task execution time is Manual Closure: The remaining time displays --.
Waiting Timeout Threshold
Value Range: 1000 to 100000000.
It indicates the waiting time in the hot spot update protection queue.
When the set threshold is less than the maximum value of 100000000, if the waiting time in the hot spot update protection queue exceeds this threshold, the transaction will exit the hot spot update protection queue and follow the original row lock logic.
When the set threshold is the maximum value of 100000000, if the waiting time in the hot spot update protection queue exceeds this threshold, the transaction will always wait.
Operation
Close task: When you need to terminate a task with the status Running, click Close in the Operation column.
Delete task: When you need to delete a task with the status Terminated or Completed, you can delete tasks individually or in batches.
Single deletion: Click Delete in the Operation column of the corresponding task.
Batch deletion: Select one or more tasks to be deleted in the hot spot update protection task list, and click Delete at the top of the task list.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback