Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
This feature is used to reject throughput when database has a high load so as
|
to keep database safe.
|
|
We introduced two system variables to help limit the database throughput. One
|
of the variables is 'threads_running_high_watermark', which is used to control
|
how many connections the database allowes. The other variable is
|
'threads_running_ctl_mode', which defines what type of query we would like to
|
block. It can be only SELECT query or all kinds queries(such as all DMLs etc.).
|
When connections are beyond 'thread_running_high_watermark', all of the new
|
sessions or the newly input queries(up to 'threads_running_ctl_mode'), will be
|
rejected, i.e. an error will be returned to client.
|
|
Note when 'threads_running_high_watermark' is 0, its value will be the same as
|
the value of system variable 'max_connections'.
|
https://github.com/alibaba/AliSQL/commit/ac2f2026324d97de135c39a76736beeeb13b494a