Skip to content

docs: add Region Failover configuration guide #1866

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -506,3 +506,27 @@ meta:

- `etcd.endpoints`: The etcd endpoints.
- `etcd.storeKeyPrefix`: The etcd store key prefix. All keys will be stored with this prefix. If you want to use one etcd cluster for multiple GreptimeDB clusters, you can configure different store key prefixes for each GreptimeDB cluster. It's only for testing and debugging purposes.

### Enable Region Failover

You can enable Region Failover through the `meta.enableRegionFailover` field. Before enabling Region Failover, ensure your deployment meets the prerequisites outlined in the [Region Failover](/user-guide/deployments-administration/manage-data/region-failover.md) documentation. If your configuration does not meet the prerequisites, the **Operator will fail to deploy the cluster components**.

```yaml
meta:
enableRegionFailover: true
```

#### Enable Region Failover on Local WAL

To enable Region Failover on local WAL, you need to set both `meta.enableRegionFailover: true` and add `allow_region_failover_on_local_wal = true` in the `meta.configData` field.

:::warning WARNING
Enabling Region Failover on local WAL may lead to data loss during failover. Ensure your operator version is greater than or equal to v0.2.2.
:::

```yaml
meta:
enableRegionFailover: true
configData: |
allow_region_failover_on_local_wal = true
```
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,7 @@ Set the `enable_region_failover=true` in [metasrv](/user-guide/deployments-admin

### Via GreptimeDB Operator

Set the `meta.enableRegionFailover=true`, e.g.,
```bash
helm install greptimedb greptime/greptimedb-cluster \
--set meta.enableRegionFailover=true \
...
```

If you want to enable region failover on local WAL, ensure your operator version is greater than or equal to v0.2.2.
To enable region failover via GreptimeDB Operator, you can refer to [Common Helm Chart Configurations](/user-guide/deployments-administration/deploy-on-kubernetes/common-helm-chart-configurations.md#enable-region-failover) for more details.

## The recovery time of Region Failover

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,3 +506,27 @@ meta:

- `etcd.endpoints`: etcd 服务地址。
- `etcd.storeKeyPrefix`: etcd 存储 key 前缀。所有 key 都会被存储在这个前缀下。如果你希望使用一个 etcd 集群为多个 GreptimeDB 集群提供服务,你可以为每个 GreptimeDB 集群配置不同的存储 key 前缀。这仅用于测试和调试目的。

### 启用 Region Failover

你可以通过 `meta.enableRegionFailover` 字段启用 Region Failover。在启用 Region Failover 之前,请确保你的部署满足 [Region Failover](/user-guide/deployments-administration/manage-data/region-failover.md) 文档中的先决条件。如果你的配置不满足条件,**Operator 将无法部署集群组件**。

```yaml
meta:
enableRegionFailover: true
```

#### 启用 Region Failover 在本地 WAL

在本地 WAL 上启用 Region Failover,你需要设置 `meta.enableRegionFailover: true` 和在 `meta.configData` 字段中添加 `allow_region_failover_on_local_wal = true`。

:::warning WARNING
在本地 WAL 启用 Region Failover 可能会导致数据丢失。另外,确保你的 Operator 版本大于或等于 v0.2.2。
:::

```yaml
meta:
enableRegionFailover: true
configData: |
allow_region_failover_on_local_wal = true
```
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,7 @@ Region Failover 提供了在不丢失数据的情况下从 Region 故障中恢

### 通过 GreptimeDB Operator

通过设置 `meta.enableRegionFailover=true`, 例如

```bash
helm install greptimedb greptime/greptimedb-cluster \
--set meta.enableRegionFailover=true \
...
```

如果想要在本地 WAL 上启用 Region Failover,确保你的 GreptimeDB Operator 版本大于或等于 v0.2.2。
要通过 GreptimeDB Operator 启用 Region Failover,可以参考 [常见 Helm Chart 配置项](/user-guide/deployments-administration/deploy-on-kubernetes/common-helm-chart-configurations.md#enable-region-failover) 了解更多详细信息。

## Region Failover 的恢复用时

Expand Down