> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-parallel-read-in-order-multi-part.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# system.fail_points

> 包含所有可用 failpoint 及其类型和当前状态的列表。

## 描述

包含服务器中已注册的所有可用 failpoint 及其类型，以及当前是否启用。

在支持 failpoint 的构建 (`USE_LIBFIU=1`) 中，可以在运行时使用 `SYSTEM ENABLE FAILPOINT` 和 `SYSTEM DISABLE FAILPOINT` 语句来启用或禁用 failpoint。在不支持 failpoint 的构建中，这些语句不可用，但该表仍然可用。

`SYSTEM DISABLE ALL FAILPOINTS` 会一次性禁用所有 failpoint，并唤醒所有因可暂停 failpoint 而阻塞的线程；无需了解当前启用了哪些 failpoint，即可将服务器恢复到干净状态，这一点非常有用。

## 列

* `name` ([String](/zh/reference/data-types/string)) — failpoint 的名称。
* `type` ([Enum8('once' = 0, 'regular' = 1, 'pauseable\_once' = 2, 'pauseable' = 3)](/zh/reference/data-types/enum)) — failpoint 的类型：'once' 触发一次后自动禁用，'regular' 每次都会触发，'pauseable\_once' 会阻塞执行一次，'pauseable' 会在每次执行时阻塞，直到恢复。
* `enabled` ([UInt8](/zh/reference/data-types/int-uint)) — failpoint 当前是否启用：启用为 (1)，禁用为 (0)。

## 示例

此示例需要使用支持 failpoint 的构建版本 (`USE_LIBFIU=1`) 。

```sql title="Query" theme={null}
SYSTEM ENABLE FAILPOINT replicated_merge_tree_insert_retry_pause;
SELECT * FROM system.fail_points WHERE enabled = 1
```

```text title="Response" theme={null}
┌─name──────────────────────────────────────┬─type────────────┬─enabled─┐
│ replicated_merge_tree_insert_retry_pause  │ pauseable_once  │       1 │
└───────────────────────────────────────────┴─────────────────┴─────────┘
```
