- Only users with the SYSTEM-level BLACKLIST privilege can use this feature.
- Each FE node keeps its own BE and CN Blacklist, and will not share it with other FE nodes.
Add a BE/CN to the blacklist
You can manually add a BE/CN node to the Blacklist using ADD BACKEND/COMPUTE NODE BLACKLIST. In this statement, you must specify the ID of the BE/CN node to be blacklisted. You can obtain the BE ID by executing SHOW BACKENDS and CN ID by executing SHOW COMPUTE NODES. Example:Remove a BE/CN from blacklist
You can manually remove a BE/CN node from the Blacklist using DELETE BACKEND/COMPUTE NODE BLACKLIST. In this statement, you must also specify the ID of the BE/CN node. Example:View BE/CN Blacklist
You can view the BE/CN nodes in the Blacklist using SHOW BACKEND/COMPUTE NODE BLACKLIST. Example:AddBlackListType: How the BE/CN node was added to the blacklist.MANUALindicates it is manually blacklisted by the user.AUTOindicates it is automatically blacklisted by the database.LostConnectionTime:- For the
MANUALtype, it indicates the time when the BE/CN node was manually added to the blacklist. - For the
AUTOtype, it indicates the time when the last successful connection was established.
- For the
LostConnectionNumberInPeriod: The number of disconnections detected withinCheckTimePeriod(s), which is the interval at which the database checks the connection status of the BE/CN nodes in the blacklist.CheckTimePeriod(s): The interval at which the database checks the connection status of the blacklisted BE/CN nodes. Its value is evaluated to the value you specified for the FE configuration itemblack_host_history_sec. Unit: Seconds.
Configure automatic management of BE/CN Blacklist
Each time a BE/CN node loses connection to the FE node, or a query fails due to timeout on a BE/CN node, the FE node adds the BE/CN node to its BE and CN Blacklist. The FE node will constantly assess the connectivity of the BE/CN node in the blacklist by counting its connection failures within a certain duration of time. The database will remove a blacklisted BE/CN node only if the number of its connection failures is below a pre-specified threshold. You can configure the automatic management of the BE and CN Blacklist using the following FE configurations:black_host_history_sec: The time duration for retaining historical connection failures of BE/CN nodes in the Blacklist.black_host_connect_failures_within_time: The threshold of connection failures allowed for a blacklisted BE/CN node.
black_host_history_sec, only if a blacklisted BE/CN node has fewer connection failures than the threshold set in black_host_connect_failures_within_time, it can be removed from the Blacklist.