From 2b56b77612bb7b3f4bb27d2856b874c98a5fc1ea Mon Sep 17 00:00:00 2001 From: WenyXu Date: Mon, 28 Sep 2026 06:10:32 +0000 Subject: [PATCH 1/6] docs: use revision-based etcd auto compaction --- .../manage-metadata/manage-etcd.md | 22 ++++++++++--------- .../manage-metadata/manage-etcd.md | 22 ++++++++++--------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/docs/user-guide/deployments-administration/manage-metadata/manage-etcd.md b/docs/user-guide/deployments-administration/manage-metadata/manage-etcd.md index 25cb017356..2a4892eef3 100644 --- a/docs/user-guide/deployments-administration/manage-metadata/manage-etcd.md +++ b/docs/user-guide/deployments-administration/manage-metadata/manage-etcd.md @@ -47,8 +47,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -59,6 +59,8 @@ extraEnvVars: value: "10000" ``` +This configuration uses revision-based auto compaction. Every 5 minutes, etcd checks the current revision and compacts up to `current revision - 100`. The retained history window depends on the write rate; clients that read or watch older revisions must handle compaction errors. Compaction makes space available for reuse within etcd; reclaiming disk space requires defragmentation. + Install etcd cluster: ```bash @@ -144,8 +146,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -276,8 +278,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -385,8 +387,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -473,8 +475,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/manage-metadata/manage-etcd.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/manage-metadata/manage-etcd.md index 3b326060c8..137e7d7587 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/manage-metadata/manage-etcd.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/manage-metadata/manage-etcd.md @@ -47,8 +47,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -59,6 +59,8 @@ extraEnvVars: value: "10000" ``` +此配置使用基于 revision 的自动压缩。etcd 每 5 分钟检查一次当前 revision,并压缩至 `当前 revision - 100`。保留的历史时间窗口取决于写入速率;读取或监听旧 revision 的客户端需要处理历史版本已被压缩的错误。压缩释放的空间可供 etcd 内部复用;要回收磁盘空间,还需要进行碎片整理(defragmentation)。 + 安装 etcd 集群: ```bash @@ -144,8 +146,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -276,8 +278,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -385,8 +387,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -473,8 +475,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES From 803c5eb51ec847fbc5524cc542dbf18f3585603b Mon Sep 17 00:00:00 2001 From: WenyXu Date: Mon, 28 Sep 2026 06:51:32 +0000 Subject: [PATCH 2/6] docs: add etcd NOSPACE troubleshooting FAQ Signed-off-by: WenyXu --- docs/faq-and-others/faq.md | 15 +++++++++++++++ .../current/faq-and-others/faq.md | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/docs/faq-and-others/faq.md b/docs/faq-and-others/faq.md index 53be6f71b5..991766606c 100644 --- a/docs/faq-and-others/faq.md +++ b/docs/faq-and-others/faq.md @@ -231,6 +231,21 @@ That said, **etcd remains fully supported and actively maintained**. It is not d The decision ultimately comes down to your team's skill set and existing infrastructure. See [Metadata Storage Configuration](/user-guide/deployments-administration/manage-metadata/configuration.md) for setup instructions for each backend. +### What should I do if etcd reports `NOSPACE`? + +`NOSPACE` means etcd has reached its backend storage quota. A common cause is retaining too many historical versions because automatic compaction is disabled or its retention is too long. Frequent `ALTER TABLE` requests repeatedly update table metadata (table info), accumulating historical values even when the number of tables stays unchanged. + +GreptimeDB does not need these historical versions to look back at table metadata. For the Bitnami etcd Helm chart, use revision-based auto compaction: + +```yaml +autoCompactionMode: "revision" +autoCompactionRetention: "100" +``` + +Every 5 minutes, etcd compacts up to `current revision - 100`. See [Manage etcd](/user-guide/deployments-administration/manage-metadata/manage-etcd.md#install) for the full configuration. + +If `NOSPACE` has already occurred, compact old revisions, defragment the database to reclaim disk space, and disarm the alarm after usage falls below the quota. If current data alone approaches the quota, review capacity as well. + ### How do I manage GreptimeDB? GreptimeDB uses **standard SQL as its management interface**. You can [create tables](/user-guide/deployments-administration/manage-data/basic-table-operations.md), [alter schemas](/reference/sql/alter.md), set [TTL policies](/user-guide/manage-data/overview.md#manage-data-retention-with-ttl-policies), and configure [indexes](/user-guide/manage-data/data-index.md) — all through SQL. No config files to write, no proprietary APIs to call. diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/faq-and-others/faq.md b/i18n/zh/docusaurus-plugin-content-docs/current/faq-and-others/faq.md index 68fe29c4fb..98568026cd 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/faq-and-others/faq.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/faq-and-others/faq.md @@ -231,6 +231,21 @@ GreptimeDB 的 metasrv 组件支持 etcd、MySQL 和 PostgreSQL 作为元数据 最终取决于团队的技术栈和已有基础设施。各后端的配置方式参见[元数据存储配置](/user-guide/deployments-administration/manage-metadata/configuration.md)。 +### 使用 etcd 时遇到 `NOSPACE` 错误怎么办? + +`NOSPACE` 表示 etcd 的后端数据库已达到空间配额。常见原因是未开启自动压缩(compaction),或历史版本保留过多。例如,大量 `ALTER TABLE` 请求会反复更新表元数据(table info),即使表的数量没有增加,也会积累大量历史版本。 + +GreptimeDB 不需要通过这些历史版本回溯表元数据。使用 Bitnami 的 etcd Helm chart 时,建议配置基于 revision 的自动压缩: + +```yaml +autoCompactionMode: "revision" +autoCompactionRetention: "100" +``` + +etcd 每 5 分钟压缩至 `当前 revision - 100`。完整配置参见[管理 etcd](/user-guide/deployments-administration/manage-metadata/manage-etcd.md#安装)。 + +如果已触发 `NOSPACE`,需要压缩历史版本、进行碎片整理(defragmentation)以回收磁盘空间,并在空间占用降至配额以下后解除告警。如果当前有效数据本身已接近配额,还需要评估容量。 + ### 如何管理 GreptimeDB? GreptimeDB 使用**标准 SQL 作为管理接口**。你可以通过 SQL 完成[表的基本操作如建表删表](/user-guide/deployments-administration/manage-data/basic-table-operations.md)、[修改 Schema](/reference/sql/alter.md)、设置 [TTL 策略](/user-guide/manage-data/overview.md#使用-ttl-策略保留数据)、配置[索引](/user-guide/manage-data/data-index.md)等操作,不用写配置文件,也不用调专有 API。 From b3576d5e249fec0ef3ad87262120f2fc7fa8148b Mon Sep 17 00:00:00 2001 From: WenyXu Date: Tue, 29 Sep 2026 03:03:57 +0000 Subject: [PATCH 3/6] docs: recommend RDS in etcd NOSPACE FAQ Signed-off-by: WenyXu --- docs/faq-and-others/faq.md | 2 ++ .../current/faq-and-others/faq.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docs/faq-and-others/faq.md b/docs/faq-and-others/faq.md index 991766606c..f5c5a16abe 100644 --- a/docs/faq-and-others/faq.md +++ b/docs/faq-and-others/faq.md @@ -246,6 +246,8 @@ Every 5 minutes, etcd compacts up to `current revision - 100`. See [Manage etcd] If `NOSPACE` has already occurred, compact old revisions, defragment the database to reclaim disk space, and disarm the alarm after usage falls below the quota. If current data alone approaches the quota, review capacity as well. +For production deployments, prefer managed MySQL or PostgreSQL (RDS) for metadata storage. This avoids etcd-specific `NOSPACE` errors caused by retaining too many historical versions and reduces maintenance work such as configuring auto compaction and running defragmentation. See [Metadata Storage Configuration](/user-guide/deployments-administration/manage-metadata/configuration.md) for setup instructions. + ### How do I manage GreptimeDB? GreptimeDB uses **standard SQL as its management interface**. You can [create tables](/user-guide/deployments-administration/manage-data/basic-table-operations.md), [alter schemas](/reference/sql/alter.md), set [TTL policies](/user-guide/manage-data/overview.md#manage-data-retention-with-ttl-policies), and configure [indexes](/user-guide/manage-data/data-index.md) — all through SQL. No config files to write, no proprietary APIs to call. diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/faq-and-others/faq.md b/i18n/zh/docusaurus-plugin-content-docs/current/faq-and-others/faq.md index 98568026cd..9c36192a92 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/faq-and-others/faq.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/faq-and-others/faq.md @@ -246,6 +246,8 @@ etcd 每 5 分钟压缩至 `当前 revision - 100`。完整配置参见[管理 e 如果已触发 `NOSPACE`,需要压缩历史版本、进行碎片整理(defragmentation)以回收磁盘空间,并在空间占用降至配额以下后解除告警。如果当前有效数据本身已接近配额,还需要评估容量。 +生产环境建议优先使用托管 MySQL 或 PostgreSQL(RDS)作为元数据存储,避免 etcd 因保留过多历史版本而触发 `NOSPACE`,同时减少自动压缩和碎片整理等维护工作。配置方式参见[元数据存储配置](/user-guide/deployments-administration/manage-metadata/configuration.md)。 + ### 如何管理 GreptimeDB? GreptimeDB 使用**标准 SQL 作为管理接口**。你可以通过 SQL 完成[表的基本操作如建表删表](/user-guide/deployments-administration/manage-data/basic-table-operations.md)、[修改 Schema](/reference/sql/alter.md)、设置 [TTL 策略](/user-guide/manage-data/overview.md#使用-ttl-策略保留数据)、配置[索引](/user-guide/manage-data/data-index.md)等操作,不用写配置文件,也不用调专有 API。 From b6f55ffc9290ac4169e7bbf141b81511a3344d60 Mon Sep 17 00:00:00 2001 From: WenyXu Date: Tue, 29 Sep 2026 07:07:48 +0000 Subject: [PATCH 4/6] docs: link etcd defragmentation instructions in FAQ Signed-off-by: WenyXu --- docs/faq-and-others/faq.md | 2 +- .../current/faq-and-others/faq.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/faq-and-others/faq.md b/docs/faq-and-others/faq.md index f5c5a16abe..0d76583a0a 100644 --- a/docs/faq-and-others/faq.md +++ b/docs/faq-and-others/faq.md @@ -244,7 +244,7 @@ autoCompactionRetention: "100" Every 5 minutes, etcd compacts up to `current revision - 100`. See [Manage etcd](/user-guide/deployments-administration/manage-metadata/manage-etcd.md#install) for the full configuration. -If `NOSPACE` has already occurred, compact old revisions, defragment the database to reclaim disk space, and disarm the alarm after usage falls below the quota. If current data alone approaches the quota, review capacity as well. +If `NOSPACE` has already occurred, compact old revisions, [defragment the database](https://etcd.io/docs/v3.6/op-guide/maintenance/#defragmentation) to reclaim disk space, and disarm the alarm after usage falls below the quota. If current data alone approaches the quota, review capacity as well. For production deployments, prefer managed MySQL or PostgreSQL (RDS) for metadata storage. This avoids etcd-specific `NOSPACE` errors caused by retaining too many historical versions and reduces maintenance work such as configuring auto compaction and running defragmentation. See [Metadata Storage Configuration](/user-guide/deployments-administration/manage-metadata/configuration.md) for setup instructions. diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/faq-and-others/faq.md b/i18n/zh/docusaurus-plugin-content-docs/current/faq-and-others/faq.md index 9c36192a92..a87db4bd79 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/faq-and-others/faq.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/faq-and-others/faq.md @@ -244,7 +244,7 @@ autoCompactionRetention: "100" etcd 每 5 分钟压缩至 `当前 revision - 100`。完整配置参见[管理 etcd](/user-guide/deployments-administration/manage-metadata/manage-etcd.md#安装)。 -如果已触发 `NOSPACE`,需要压缩历史版本、进行碎片整理(defragmentation)以回收磁盘空间,并在空间占用降至配额以下后解除告警。如果当前有效数据本身已接近配额,还需要评估容量。 +如果已触发 `NOSPACE`,需要压缩历史版本、进行[碎片整理(defragmentation)](https://etcd.io/docs/v3.6/op-guide/maintenance/#defragmentation)以回收磁盘空间,并在空间占用降至配额以下后解除告警。如果当前有效数据本身已接近配额,还需要评估容量。 生产环境建议优先使用托管 MySQL 或 PostgreSQL(RDS)作为元数据存储,避免 etcd 因保留过多历史版本而触发 `NOSPACE`,同时减少自动压缩和碎片整理等维护工作。配置方式参见[元数据存储配置](/user-guide/deployments-administration/manage-metadata/configuration.md)。 From c1ec1524dff8da07a1fbcab583d98130c716ca1a Mon Sep 17 00:00:00 2001 From: WenyXu Date: Tue, 29 Sep 2026 07:42:02 +0000 Subject: [PATCH 5/6] docs: backport etcd compaction guidance to 1.0-1.2 Signed-off-by: WenyXu --- .../version-1.0/faq-and-others/faq.md | 17 ++++++++++++++ .../manage-metadata/manage-etcd.md | 22 ++++++++++--------- .../version-1.1/faq-and-others/faq.md | 17 ++++++++++++++ .../manage-metadata/manage-etcd.md | 22 ++++++++++--------- .../version-1.2/faq-and-others/faq.md | 17 ++++++++++++++ .../manage-metadata/manage-etcd.md | 22 ++++++++++--------- .../version-1.0/faq-and-others/faq.md | 17 ++++++++++++++ .../manage-metadata/manage-etcd.md | 22 ++++++++++--------- .../version-1.1/faq-and-others/faq.md | 17 ++++++++++++++ .../manage-metadata/manage-etcd.md | 22 ++++++++++--------- .../version-1.2/faq-and-others/faq.md | 17 ++++++++++++++ .../manage-metadata/manage-etcd.md | 22 ++++++++++--------- 12 files changed, 174 insertions(+), 60 deletions(-) diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/faq-and-others/faq.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/faq-and-others/faq.md index 7448d8cc31..6ffc49058c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/faq-and-others/faq.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/faq-and-others/faq.md @@ -225,6 +225,23 @@ GreptimeDB 的 metasrv 组件支持 etcd、MySQL 和 PostgreSQL 作为元数据 最终取决于团队的技术栈和已有基础设施。各后端的配置方式参见[元数据存储配置](/user-guide/deployments-administration/manage-metadata/configuration.md)。 +### 使用 etcd 时遇到 `NOSPACE` 错误怎么办? + +`NOSPACE` 表示 etcd 的后端数据库已达到空间配额。常见原因是未开启自动压缩(compaction),或历史版本保留过多。例如,大量 `ALTER TABLE` 请求会反复更新表元数据(table info),即使表的数量没有增加,也会积累大量历史版本。 + +GreptimeDB 不需要通过这些历史版本回溯表元数据。使用 Bitnami 的 etcd Helm chart 时,建议配置基于 revision 的自动压缩: + +```yaml +autoCompactionMode: "revision" +autoCompactionRetention: "100" +``` + +etcd 每 5 分钟压缩至 `当前 revision - 100`。完整配置参见[管理 etcd](/user-guide/deployments-administration/manage-metadata/manage-etcd.md#安装)。 + +如果已触发 `NOSPACE`,需要压缩历史版本、进行[碎片整理(defragmentation)](https://etcd.io/docs/v3.6/op-guide/maintenance/#defragmentation)以回收磁盘空间,并在空间占用降至配额以下后解除告警。如果当前有效数据本身已接近配额,还需要评估容量。 + +生产环境建议优先使用托管 MySQL 或 PostgreSQL(RDS)作为元数据存储,避免 etcd 因保留过多历史版本而触发 `NOSPACE`,同时减少自动压缩和碎片整理等维护工作。配置方式参见[元数据存储配置](/user-guide/deployments-administration/manage-metadata/configuration.md)。 + ### 如何管理 GreptimeDB? GreptimeDB 使用**标准 SQL 作为管理接口**。你可以通过 SQL 完成[表的基本操作如建表删表](/user-guide/deployments-administration/manage-data/basic-table-operations.md)、[修改 Schema](/reference/sql/alter.md)、设置 [TTL 策略](/user-guide/manage-data/overview.md#使用-ttl-策略保留数据)、配置[索引](/user-guide/manage-data/data-index.md)等操作,不用写配置文件,也不用调专有 API。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/manage-metadata/manage-etcd.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/manage-metadata/manage-etcd.md index 3b326060c8..137e7d7587 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/manage-metadata/manage-etcd.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/manage-metadata/manage-etcd.md @@ -47,8 +47,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -59,6 +59,8 @@ extraEnvVars: value: "10000" ``` +此配置使用基于 revision 的自动压缩。etcd 每 5 分钟检查一次当前 revision,并压缩至 `当前 revision - 100`。保留的历史时间窗口取决于写入速率;读取或监听旧 revision 的客户端需要处理历史版本已被压缩的错误。压缩释放的空间可供 etcd 内部复用;要回收磁盘空间,还需要进行碎片整理(defragmentation)。 + 安装 etcd 集群: ```bash @@ -144,8 +146,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -276,8 +278,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -385,8 +387,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -473,8 +475,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/faq-and-others/faq.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/faq-and-others/faq.md index 76770dd2c9..afd521d6c5 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/faq-and-others/faq.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/faq-and-others/faq.md @@ -225,6 +225,23 @@ GreptimeDB 的 metasrv 组件支持 etcd、MySQL 和 PostgreSQL 作为元数据 最终取决于团队的技术栈和已有基础设施。各后端的配置方式参见[元数据存储配置](/user-guide/deployments-administration/manage-metadata/configuration.md)。 +### 使用 etcd 时遇到 `NOSPACE` 错误怎么办? + +`NOSPACE` 表示 etcd 的后端数据库已达到空间配额。常见原因是未开启自动压缩(compaction),或历史版本保留过多。例如,大量 `ALTER TABLE` 请求会反复更新表元数据(table info),即使表的数量没有增加,也会积累大量历史版本。 + +GreptimeDB 不需要通过这些历史版本回溯表元数据。使用 Bitnami 的 etcd Helm chart 时,建议配置基于 revision 的自动压缩: + +```yaml +autoCompactionMode: "revision" +autoCompactionRetention: "100" +``` + +etcd 每 5 分钟压缩至 `当前 revision - 100`。完整配置参见[管理 etcd](/user-guide/deployments-administration/manage-metadata/manage-etcd.md#安装)。 + +如果已触发 `NOSPACE`,需要压缩历史版本、进行[碎片整理(defragmentation)](https://etcd.io/docs/v3.6/op-guide/maintenance/#defragmentation)以回收磁盘空间,并在空间占用降至配额以下后解除告警。如果当前有效数据本身已接近配额,还需要评估容量。 + +生产环境建议优先使用托管 MySQL 或 PostgreSQL(RDS)作为元数据存储,避免 etcd 因保留过多历史版本而触发 `NOSPACE`,同时减少自动压缩和碎片整理等维护工作。配置方式参见[元数据存储配置](/user-guide/deployments-administration/manage-metadata/configuration.md)。 + ### 如何管理 GreptimeDB? GreptimeDB 使用**标准 SQL 作为管理接口**。你可以通过 SQL 完成[表的基本操作如建表删表](/user-guide/deployments-administration/manage-data/basic-table-operations.md)、[修改 Schema](/reference/sql/alter.md)、设置 [TTL 策略](/user-guide/manage-data/overview.md#使用-ttl-策略保留数据)、配置[索引](/user-guide/manage-data/data-index.md)等操作,不用写配置文件,也不用调专有 API。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/manage-metadata/manage-etcd.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/manage-metadata/manage-etcd.md index 3b326060c8..137e7d7587 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/manage-metadata/manage-etcd.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/manage-metadata/manage-etcd.md @@ -47,8 +47,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -59,6 +59,8 @@ extraEnvVars: value: "10000" ``` +此配置使用基于 revision 的自动压缩。etcd 每 5 分钟检查一次当前 revision,并压缩至 `当前 revision - 100`。保留的历史时间窗口取决于写入速率;读取或监听旧 revision 的客户端需要处理历史版本已被压缩的错误。压缩释放的空间可供 etcd 内部复用;要回收磁盘空间,还需要进行碎片整理(defragmentation)。 + 安装 etcd 集群: ```bash @@ -144,8 +146,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -276,8 +278,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -385,8 +387,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -473,8 +475,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.2/faq-and-others/faq.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.2/faq-and-others/faq.md index 76770dd2c9..afd521d6c5 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.2/faq-and-others/faq.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.2/faq-and-others/faq.md @@ -225,6 +225,23 @@ GreptimeDB 的 metasrv 组件支持 etcd、MySQL 和 PostgreSQL 作为元数据 最终取决于团队的技术栈和已有基础设施。各后端的配置方式参见[元数据存储配置](/user-guide/deployments-administration/manage-metadata/configuration.md)。 +### 使用 etcd 时遇到 `NOSPACE` 错误怎么办? + +`NOSPACE` 表示 etcd 的后端数据库已达到空间配额。常见原因是未开启自动压缩(compaction),或历史版本保留过多。例如,大量 `ALTER TABLE` 请求会反复更新表元数据(table info),即使表的数量没有增加,也会积累大量历史版本。 + +GreptimeDB 不需要通过这些历史版本回溯表元数据。使用 Bitnami 的 etcd Helm chart 时,建议配置基于 revision 的自动压缩: + +```yaml +autoCompactionMode: "revision" +autoCompactionRetention: "100" +``` + +etcd 每 5 分钟压缩至 `当前 revision - 100`。完整配置参见[管理 etcd](/user-guide/deployments-administration/manage-metadata/manage-etcd.md#安装)。 + +如果已触发 `NOSPACE`,需要压缩历史版本、进行[碎片整理(defragmentation)](https://etcd.io/docs/v3.6/op-guide/maintenance/#defragmentation)以回收磁盘空间,并在空间占用降至配额以下后解除告警。如果当前有效数据本身已接近配额,还需要评估容量。 + +生产环境建议优先使用托管 MySQL 或 PostgreSQL(RDS)作为元数据存储,避免 etcd 因保留过多历史版本而触发 `NOSPACE`,同时减少自动压缩和碎片整理等维护工作。配置方式参见[元数据存储配置](/user-guide/deployments-administration/manage-metadata/configuration.md)。 + ### 如何管理 GreptimeDB? GreptimeDB 使用**标准 SQL 作为管理接口**。你可以通过 SQL 完成[表的基本操作如建表删表](/user-guide/deployments-administration/manage-data/basic-table-operations.md)、[修改 Schema](/reference/sql/alter.md)、设置 [TTL 策略](/user-guide/manage-data/overview.md#使用-ttl-策略保留数据)、配置[索引](/user-guide/manage-data/data-index.md)等操作,不用写配置文件,也不用调专有 API。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.2/user-guide/deployments-administration/manage-metadata/manage-etcd.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.2/user-guide/deployments-administration/manage-metadata/manage-etcd.md index 3b326060c8..137e7d7587 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.2/user-guide/deployments-administration/manage-metadata/manage-etcd.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.2/user-guide/deployments-administration/manage-metadata/manage-etcd.md @@ -47,8 +47,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -59,6 +59,8 @@ extraEnvVars: value: "10000" ``` +此配置使用基于 revision 的自动压缩。etcd 每 5 分钟检查一次当前 revision,并压缩至 `当前 revision - 100`。保留的历史时间窗口取决于写入速率;读取或监听旧 revision 的客户端需要处理历史版本已被压缩的错误。压缩释放的空间可供 etcd 内部复用;要回收磁盘空间,还需要进行碎片整理(defragmentation)。 + 安装 etcd 集群: ```bash @@ -144,8 +146,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -276,8 +278,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -385,8 +387,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -473,8 +475,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES diff --git a/versioned_docs/version-1.0/faq-and-others/faq.md b/versioned_docs/version-1.0/faq-and-others/faq.md index 93749f4f7e..600ce85ee9 100644 --- a/versioned_docs/version-1.0/faq-and-others/faq.md +++ b/versioned_docs/version-1.0/faq-and-others/faq.md @@ -225,6 +225,23 @@ That said, **etcd remains fully supported and actively maintained**. It is not d The decision ultimately comes down to your team's skill set and existing infrastructure. See [Metadata Storage Configuration](/user-guide/deployments-administration/manage-metadata/configuration.md) for setup instructions for each backend. +### What should I do if etcd reports `NOSPACE`? + +`NOSPACE` means etcd has reached its backend storage quota. A common cause is retaining too many historical versions because automatic compaction is disabled or its retention is too long. Frequent `ALTER TABLE` requests repeatedly update table metadata (table info), accumulating historical values even when the number of tables stays unchanged. + +GreptimeDB does not need these historical versions to look back at table metadata. For the Bitnami etcd Helm chart, use revision-based auto compaction: + +```yaml +autoCompactionMode: "revision" +autoCompactionRetention: "100" +``` + +Every 5 minutes, etcd compacts up to `current revision - 100`. See [Manage etcd](/user-guide/deployments-administration/manage-metadata/manage-etcd.md#install) for the full configuration. + +If `NOSPACE` has already occurred, compact old revisions, [defragment the database](https://etcd.io/docs/v3.6/op-guide/maintenance/#defragmentation) to reclaim disk space, and disarm the alarm after usage falls below the quota. If current data alone approaches the quota, review capacity as well. + +For production deployments, prefer managed MySQL or PostgreSQL (RDS) for metadata storage. This avoids etcd-specific `NOSPACE` errors caused by retaining too many historical versions and reduces maintenance work such as configuring auto compaction and running defragmentation. See [Metadata Storage Configuration](/user-guide/deployments-administration/manage-metadata/configuration.md) for setup instructions. + ### How do I manage GreptimeDB? GreptimeDB uses **standard SQL as its management interface**. You can [create tables](/user-guide/deployments-administration/manage-data/basic-table-operations.md), [alter schemas](/reference/sql/alter.md), set [TTL policies](/user-guide/manage-data/overview.md#manage-data-retention-with-ttl-policies), and configure [indexes](/user-guide/manage-data/data-index.md) — all through SQL. No config files to write, no proprietary APIs to call. diff --git a/versioned_docs/version-1.0/user-guide/deployments-administration/manage-metadata/manage-etcd.md b/versioned_docs/version-1.0/user-guide/deployments-administration/manage-metadata/manage-etcd.md index 25cb017356..2a4892eef3 100644 --- a/versioned_docs/version-1.0/user-guide/deployments-administration/manage-metadata/manage-etcd.md +++ b/versioned_docs/version-1.0/user-guide/deployments-administration/manage-metadata/manage-etcd.md @@ -47,8 +47,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -59,6 +59,8 @@ extraEnvVars: value: "10000" ``` +This configuration uses revision-based auto compaction. Every 5 minutes, etcd checks the current revision and compacts up to `current revision - 100`. The retained history window depends on the write rate; clients that read or watch older revisions must handle compaction errors. Compaction makes space available for reuse within etcd; reclaiming disk space requires defragmentation. + Install etcd cluster: ```bash @@ -144,8 +146,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -276,8 +278,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -385,8 +387,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -473,8 +475,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES diff --git a/versioned_docs/version-1.1/faq-and-others/faq.md b/versioned_docs/version-1.1/faq-and-others/faq.md index 82f54a0a74..8c3db48458 100644 --- a/versioned_docs/version-1.1/faq-and-others/faq.md +++ b/versioned_docs/version-1.1/faq-and-others/faq.md @@ -225,6 +225,23 @@ That said, **etcd remains fully supported and actively maintained**. It is not d The decision ultimately comes down to your team's skill set and existing infrastructure. See [Metadata Storage Configuration](/user-guide/deployments-administration/manage-metadata/configuration.md) for setup instructions for each backend. +### What should I do if etcd reports `NOSPACE`? + +`NOSPACE` means etcd has reached its backend storage quota. A common cause is retaining too many historical versions because automatic compaction is disabled or its retention is too long. Frequent `ALTER TABLE` requests repeatedly update table metadata (table info), accumulating historical values even when the number of tables stays unchanged. + +GreptimeDB does not need these historical versions to look back at table metadata. For the Bitnami etcd Helm chart, use revision-based auto compaction: + +```yaml +autoCompactionMode: "revision" +autoCompactionRetention: "100" +``` + +Every 5 minutes, etcd compacts up to `current revision - 100`. See [Manage etcd](/user-guide/deployments-administration/manage-metadata/manage-etcd.md#install) for the full configuration. + +If `NOSPACE` has already occurred, compact old revisions, [defragment the database](https://etcd.io/docs/v3.6/op-guide/maintenance/#defragmentation) to reclaim disk space, and disarm the alarm after usage falls below the quota. If current data alone approaches the quota, review capacity as well. + +For production deployments, prefer managed MySQL or PostgreSQL (RDS) for metadata storage. This avoids etcd-specific `NOSPACE` errors caused by retaining too many historical versions and reduces maintenance work such as configuring auto compaction and running defragmentation. See [Metadata Storage Configuration](/user-guide/deployments-administration/manage-metadata/configuration.md) for setup instructions. + ### How do I manage GreptimeDB? GreptimeDB uses **standard SQL as its management interface**. You can [create tables](/user-guide/deployments-administration/manage-data/basic-table-operations.md), [alter schemas](/reference/sql/alter.md), set [TTL policies](/user-guide/manage-data/overview.md#manage-data-retention-with-ttl-policies), and configure [indexes](/user-guide/manage-data/data-index.md) — all through SQL. No config files to write, no proprietary APIs to call. diff --git a/versioned_docs/version-1.1/user-guide/deployments-administration/manage-metadata/manage-etcd.md b/versioned_docs/version-1.1/user-guide/deployments-administration/manage-metadata/manage-etcd.md index 25cb017356..2a4892eef3 100644 --- a/versioned_docs/version-1.1/user-guide/deployments-administration/manage-metadata/manage-etcd.md +++ b/versioned_docs/version-1.1/user-guide/deployments-administration/manage-metadata/manage-etcd.md @@ -47,8 +47,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -59,6 +59,8 @@ extraEnvVars: value: "10000" ``` +This configuration uses revision-based auto compaction. Every 5 minutes, etcd checks the current revision and compacts up to `current revision - 100`. The retained history window depends on the write rate; clients that read or watch older revisions must handle compaction errors. Compaction makes space available for reuse within etcd; reclaiming disk space requires defragmentation. + Install etcd cluster: ```bash @@ -144,8 +146,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -276,8 +278,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -385,8 +387,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -473,8 +475,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES diff --git a/versioned_docs/version-1.2/faq-and-others/faq.md b/versioned_docs/version-1.2/faq-and-others/faq.md index 82f54a0a74..8c3db48458 100644 --- a/versioned_docs/version-1.2/faq-and-others/faq.md +++ b/versioned_docs/version-1.2/faq-and-others/faq.md @@ -225,6 +225,23 @@ That said, **etcd remains fully supported and actively maintained**. It is not d The decision ultimately comes down to your team's skill set and existing infrastructure. See [Metadata Storage Configuration](/user-guide/deployments-administration/manage-metadata/configuration.md) for setup instructions for each backend. +### What should I do if etcd reports `NOSPACE`? + +`NOSPACE` means etcd has reached its backend storage quota. A common cause is retaining too many historical versions because automatic compaction is disabled or its retention is too long. Frequent `ALTER TABLE` requests repeatedly update table metadata (table info), accumulating historical values even when the number of tables stays unchanged. + +GreptimeDB does not need these historical versions to look back at table metadata. For the Bitnami etcd Helm chart, use revision-based auto compaction: + +```yaml +autoCompactionMode: "revision" +autoCompactionRetention: "100" +``` + +Every 5 minutes, etcd compacts up to `current revision - 100`. See [Manage etcd](/user-guide/deployments-administration/manage-metadata/manage-etcd.md#install) for the full configuration. + +If `NOSPACE` has already occurred, compact old revisions, [defragment the database](https://etcd.io/docs/v3.6/op-guide/maintenance/#defragmentation) to reclaim disk space, and disarm the alarm after usage falls below the quota. If current data alone approaches the quota, review capacity as well. + +For production deployments, prefer managed MySQL or PostgreSQL (RDS) for metadata storage. This avoids etcd-specific `NOSPACE` errors caused by retaining too many historical versions and reduces maintenance work such as configuring auto compaction and running defragmentation. See [Metadata Storage Configuration](/user-guide/deployments-administration/manage-metadata/configuration.md) for setup instructions. + ### How do I manage GreptimeDB? GreptimeDB uses **standard SQL as its management interface**. You can [create tables](/user-guide/deployments-administration/manage-data/basic-table-operations.md), [alter schemas](/reference/sql/alter.md), set [TTL policies](/user-guide/manage-data/overview.md#manage-data-retention-with-ttl-policies), and configure [indexes](/user-guide/manage-data/data-index.md) — all through SQL. No config files to write, no proprietary APIs to call. diff --git a/versioned_docs/version-1.2/user-guide/deployments-administration/manage-metadata/manage-etcd.md b/versioned_docs/version-1.2/user-guide/deployments-administration/manage-metadata/manage-etcd.md index 25cb017356..2a4892eef3 100644 --- a/versioned_docs/version-1.2/user-guide/deployments-administration/manage-metadata/manage-etcd.md +++ b/versioned_docs/version-1.2/user-guide/deployments-administration/manage-metadata/manage-etcd.md @@ -47,8 +47,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -59,6 +59,8 @@ extraEnvVars: value: "10000" ``` +This configuration uses revision-based auto compaction. Every 5 minutes, etcd checks the current revision and compacts up to `current revision - 100`. The retained history window depends on the write rate; clients that read or watch older revisions must handle compaction errors. Compaction makes space available for reuse within etcd; reclaiming disk space requires defragmentation. + Install etcd cluster: ```bash @@ -144,8 +146,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -276,8 +278,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -385,8 +387,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -473,8 +475,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "periodic" -autoCompactionRetention: "1h" +autoCompactionMode: "revision" +autoCompactionRetention: "100" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES From 315fe19939ba9acb04ea9f5815417753892809aa Mon Sep 17 00:00:00 2001 From: WenyXu Date: Tue, 29 Sep 2026 07:43:24 +0000 Subject: [PATCH 6/6] docs: limit etcd guidance backport to 1.2 Signed-off-by: WenyXu --- .../version-1.0/faq-and-others/faq.md | 17 -------------- .../manage-metadata/manage-etcd.md | 22 +++++++++---------- .../version-1.1/faq-and-others/faq.md | 17 -------------- .../manage-metadata/manage-etcd.md | 22 +++++++++---------- .../version-1.0/faq-and-others/faq.md | 17 -------------- .../manage-metadata/manage-etcd.md | 22 +++++++++---------- .../version-1.1/faq-and-others/faq.md | 17 -------------- .../manage-metadata/manage-etcd.md | 22 +++++++++---------- 8 files changed, 40 insertions(+), 116 deletions(-) diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/faq-and-others/faq.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/faq-and-others/faq.md index 6ffc49058c..7448d8cc31 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/faq-and-others/faq.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/faq-and-others/faq.md @@ -225,23 +225,6 @@ GreptimeDB 的 metasrv 组件支持 etcd、MySQL 和 PostgreSQL 作为元数据 最终取决于团队的技术栈和已有基础设施。各后端的配置方式参见[元数据存储配置](/user-guide/deployments-administration/manage-metadata/configuration.md)。 -### 使用 etcd 时遇到 `NOSPACE` 错误怎么办? - -`NOSPACE` 表示 etcd 的后端数据库已达到空间配额。常见原因是未开启自动压缩(compaction),或历史版本保留过多。例如,大量 `ALTER TABLE` 请求会反复更新表元数据(table info),即使表的数量没有增加,也会积累大量历史版本。 - -GreptimeDB 不需要通过这些历史版本回溯表元数据。使用 Bitnami 的 etcd Helm chart 时,建议配置基于 revision 的自动压缩: - -```yaml -autoCompactionMode: "revision" -autoCompactionRetention: "100" -``` - -etcd 每 5 分钟压缩至 `当前 revision - 100`。完整配置参见[管理 etcd](/user-guide/deployments-administration/manage-metadata/manage-etcd.md#安装)。 - -如果已触发 `NOSPACE`,需要压缩历史版本、进行[碎片整理(defragmentation)](https://etcd.io/docs/v3.6/op-guide/maintenance/#defragmentation)以回收磁盘空间,并在空间占用降至配额以下后解除告警。如果当前有效数据本身已接近配额,还需要评估容量。 - -生产环境建议优先使用托管 MySQL 或 PostgreSQL(RDS)作为元数据存储,避免 etcd 因保留过多历史版本而触发 `NOSPACE`,同时减少自动压缩和碎片整理等维护工作。配置方式参见[元数据存储配置](/user-guide/deployments-administration/manage-metadata/configuration.md)。 - ### 如何管理 GreptimeDB? GreptimeDB 使用**标准 SQL 作为管理接口**。你可以通过 SQL 完成[表的基本操作如建表删表](/user-guide/deployments-administration/manage-data/basic-table-operations.md)、[修改 Schema](/reference/sql/alter.md)、设置 [TTL 策略](/user-guide/manage-data/overview.md#使用-ttl-策略保留数据)、配置[索引](/user-guide/manage-data/data-index.md)等操作,不用写配置文件,也不用调专有 API。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/manage-metadata/manage-etcd.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/manage-metadata/manage-etcd.md index 137e7d7587..3b326060c8 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/manage-metadata/manage-etcd.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/deployments-administration/manage-metadata/manage-etcd.md @@ -47,8 +47,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "revision" -autoCompactionRetention: "100" +autoCompactionMode: "periodic" +autoCompactionRetention: "1h" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -59,8 +59,6 @@ extraEnvVars: value: "10000" ``` -此配置使用基于 revision 的自动压缩。etcd 每 5 分钟检查一次当前 revision,并压缩至 `当前 revision - 100`。保留的历史时间窗口取决于写入速率;读取或监听旧 revision 的客户端需要处理历史版本已被压缩的错误。压缩释放的空间可供 etcd 内部复用;要回收磁盘空间,还需要进行碎片整理(defragmentation)。 - 安装 etcd 集群: ```bash @@ -146,8 +144,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "revision" -autoCompactionRetention: "100" +autoCompactionMode: "periodic" +autoCompactionRetention: "1h" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -278,8 +276,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "revision" -autoCompactionRetention: "100" +autoCompactionMode: "periodic" +autoCompactionRetention: "1h" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -387,8 +385,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "revision" -autoCompactionRetention: "100" +autoCompactionMode: "periodic" +autoCompactionRetention: "1h" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -475,8 +473,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "revision" -autoCompactionRetention: "100" +autoCompactionMode: "periodic" +autoCompactionRetention: "1h" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/faq-and-others/faq.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/faq-and-others/faq.md index afd521d6c5..76770dd2c9 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/faq-and-others/faq.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/faq-and-others/faq.md @@ -225,23 +225,6 @@ GreptimeDB 的 metasrv 组件支持 etcd、MySQL 和 PostgreSQL 作为元数据 最终取决于团队的技术栈和已有基础设施。各后端的配置方式参见[元数据存储配置](/user-guide/deployments-administration/manage-metadata/configuration.md)。 -### 使用 etcd 时遇到 `NOSPACE` 错误怎么办? - -`NOSPACE` 表示 etcd 的后端数据库已达到空间配额。常见原因是未开启自动压缩(compaction),或历史版本保留过多。例如,大量 `ALTER TABLE` 请求会反复更新表元数据(table info),即使表的数量没有增加,也会积累大量历史版本。 - -GreptimeDB 不需要通过这些历史版本回溯表元数据。使用 Bitnami 的 etcd Helm chart 时,建议配置基于 revision 的自动压缩: - -```yaml -autoCompactionMode: "revision" -autoCompactionRetention: "100" -``` - -etcd 每 5 分钟压缩至 `当前 revision - 100`。完整配置参见[管理 etcd](/user-guide/deployments-administration/manage-metadata/manage-etcd.md#安装)。 - -如果已触发 `NOSPACE`,需要压缩历史版本、进行[碎片整理(defragmentation)](https://etcd.io/docs/v3.6/op-guide/maintenance/#defragmentation)以回收磁盘空间,并在空间占用降至配额以下后解除告警。如果当前有效数据本身已接近配额,还需要评估容量。 - -生产环境建议优先使用托管 MySQL 或 PostgreSQL(RDS)作为元数据存储,避免 etcd 因保留过多历史版本而触发 `NOSPACE`,同时减少自动压缩和碎片整理等维护工作。配置方式参见[元数据存储配置](/user-guide/deployments-administration/manage-metadata/configuration.md)。 - ### 如何管理 GreptimeDB? GreptimeDB 使用**标准 SQL 作为管理接口**。你可以通过 SQL 完成[表的基本操作如建表删表](/user-guide/deployments-administration/manage-data/basic-table-operations.md)、[修改 Schema](/reference/sql/alter.md)、设置 [TTL 策略](/user-guide/manage-data/overview.md#使用-ttl-策略保留数据)、配置[索引](/user-guide/manage-data/data-index.md)等操作,不用写配置文件,也不用调专有 API。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/manage-metadata/manage-etcd.md b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/manage-metadata/manage-etcd.md index 137e7d7587..3b326060c8 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/manage-metadata/manage-etcd.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-1.1/user-guide/deployments-administration/manage-metadata/manage-etcd.md @@ -47,8 +47,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "revision" -autoCompactionRetention: "100" +autoCompactionMode: "periodic" +autoCompactionRetention: "1h" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -59,8 +59,6 @@ extraEnvVars: value: "10000" ``` -此配置使用基于 revision 的自动压缩。etcd 每 5 分钟检查一次当前 revision,并压缩至 `当前 revision - 100`。保留的历史时间窗口取决于写入速率;读取或监听旧 revision 的客户端需要处理历史版本已被压缩的错误。压缩释放的空间可供 etcd 内部复用;要回收磁盘空间,还需要进行碎片整理(defragmentation)。 - 安装 etcd 集群: ```bash @@ -146,8 +144,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "revision" -autoCompactionRetention: "100" +autoCompactionMode: "periodic" +autoCompactionRetention: "1h" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -278,8 +276,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "revision" -autoCompactionRetention: "100" +autoCompactionMode: "periodic" +autoCompactionRetention: "1h" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -387,8 +385,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "revision" -autoCompactionRetention: "100" +autoCompactionMode: "periodic" +autoCompactionRetention: "1h" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -475,8 +473,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "revision" -autoCompactionRetention: "100" +autoCompactionMode: "periodic" +autoCompactionRetention: "1h" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES diff --git a/versioned_docs/version-1.0/faq-and-others/faq.md b/versioned_docs/version-1.0/faq-and-others/faq.md index 600ce85ee9..93749f4f7e 100644 --- a/versioned_docs/version-1.0/faq-and-others/faq.md +++ b/versioned_docs/version-1.0/faq-and-others/faq.md @@ -225,23 +225,6 @@ That said, **etcd remains fully supported and actively maintained**. It is not d The decision ultimately comes down to your team's skill set and existing infrastructure. See [Metadata Storage Configuration](/user-guide/deployments-administration/manage-metadata/configuration.md) for setup instructions for each backend. -### What should I do if etcd reports `NOSPACE`? - -`NOSPACE` means etcd has reached its backend storage quota. A common cause is retaining too many historical versions because automatic compaction is disabled or its retention is too long. Frequent `ALTER TABLE` requests repeatedly update table metadata (table info), accumulating historical values even when the number of tables stays unchanged. - -GreptimeDB does not need these historical versions to look back at table metadata. For the Bitnami etcd Helm chart, use revision-based auto compaction: - -```yaml -autoCompactionMode: "revision" -autoCompactionRetention: "100" -``` - -Every 5 minutes, etcd compacts up to `current revision - 100`. See [Manage etcd](/user-guide/deployments-administration/manage-metadata/manage-etcd.md#install) for the full configuration. - -If `NOSPACE` has already occurred, compact old revisions, [defragment the database](https://etcd.io/docs/v3.6/op-guide/maintenance/#defragmentation) to reclaim disk space, and disarm the alarm after usage falls below the quota. If current data alone approaches the quota, review capacity as well. - -For production deployments, prefer managed MySQL or PostgreSQL (RDS) for metadata storage. This avoids etcd-specific `NOSPACE` errors caused by retaining too many historical versions and reduces maintenance work such as configuring auto compaction and running defragmentation. See [Metadata Storage Configuration](/user-guide/deployments-administration/manage-metadata/configuration.md) for setup instructions. - ### How do I manage GreptimeDB? GreptimeDB uses **standard SQL as its management interface**. You can [create tables](/user-guide/deployments-administration/manage-data/basic-table-operations.md), [alter schemas](/reference/sql/alter.md), set [TTL policies](/user-guide/manage-data/overview.md#manage-data-retention-with-ttl-policies), and configure [indexes](/user-guide/manage-data/data-index.md) — all through SQL. No config files to write, no proprietary APIs to call. diff --git a/versioned_docs/version-1.0/user-guide/deployments-administration/manage-metadata/manage-etcd.md b/versioned_docs/version-1.0/user-guide/deployments-administration/manage-metadata/manage-etcd.md index 2a4892eef3..25cb017356 100644 --- a/versioned_docs/version-1.0/user-guide/deployments-administration/manage-metadata/manage-etcd.md +++ b/versioned_docs/version-1.0/user-guide/deployments-administration/manage-metadata/manage-etcd.md @@ -47,8 +47,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "revision" -autoCompactionRetention: "100" +autoCompactionMode: "periodic" +autoCompactionRetention: "1h" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -59,8 +59,6 @@ extraEnvVars: value: "10000" ``` -This configuration uses revision-based auto compaction. Every 5 minutes, etcd checks the current revision and compacts up to `current revision - 100`. The retained history window depends on the write rate; clients that read or watch older revisions must handle compaction errors. Compaction makes space available for reuse within etcd; reclaiming disk space requires defragmentation. - Install etcd cluster: ```bash @@ -146,8 +144,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "revision" -autoCompactionRetention: "100" +autoCompactionMode: "periodic" +autoCompactionRetention: "1h" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -278,8 +276,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "revision" -autoCompactionRetention: "100" +autoCompactionMode: "periodic" +autoCompactionRetention: "1h" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -387,8 +385,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "revision" -autoCompactionRetention: "100" +autoCompactionMode: "periodic" +autoCompactionRetention: "1h" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -475,8 +473,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "revision" -autoCompactionRetention: "100" +autoCompactionMode: "periodic" +autoCompactionRetention: "1h" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES diff --git a/versioned_docs/version-1.1/faq-and-others/faq.md b/versioned_docs/version-1.1/faq-and-others/faq.md index 8c3db48458..82f54a0a74 100644 --- a/versioned_docs/version-1.1/faq-and-others/faq.md +++ b/versioned_docs/version-1.1/faq-and-others/faq.md @@ -225,23 +225,6 @@ That said, **etcd remains fully supported and actively maintained**. It is not d The decision ultimately comes down to your team's skill set and existing infrastructure. See [Metadata Storage Configuration](/user-guide/deployments-administration/manage-metadata/configuration.md) for setup instructions for each backend. -### What should I do if etcd reports `NOSPACE`? - -`NOSPACE` means etcd has reached its backend storage quota. A common cause is retaining too many historical versions because automatic compaction is disabled or its retention is too long. Frequent `ALTER TABLE` requests repeatedly update table metadata (table info), accumulating historical values even when the number of tables stays unchanged. - -GreptimeDB does not need these historical versions to look back at table metadata. For the Bitnami etcd Helm chart, use revision-based auto compaction: - -```yaml -autoCompactionMode: "revision" -autoCompactionRetention: "100" -``` - -Every 5 minutes, etcd compacts up to `current revision - 100`. See [Manage etcd](/user-guide/deployments-administration/manage-metadata/manage-etcd.md#install) for the full configuration. - -If `NOSPACE` has already occurred, compact old revisions, [defragment the database](https://etcd.io/docs/v3.6/op-guide/maintenance/#defragmentation) to reclaim disk space, and disarm the alarm after usage falls below the quota. If current data alone approaches the quota, review capacity as well. - -For production deployments, prefer managed MySQL or PostgreSQL (RDS) for metadata storage. This avoids etcd-specific `NOSPACE` errors caused by retaining too many historical versions and reduces maintenance work such as configuring auto compaction and running defragmentation. See [Metadata Storage Configuration](/user-guide/deployments-administration/manage-metadata/configuration.md) for setup instructions. - ### How do I manage GreptimeDB? GreptimeDB uses **standard SQL as its management interface**. You can [create tables](/user-guide/deployments-administration/manage-data/basic-table-operations.md), [alter schemas](/reference/sql/alter.md), set [TTL policies](/user-guide/manage-data/overview.md#manage-data-retention-with-ttl-policies), and configure [indexes](/user-guide/manage-data/data-index.md) — all through SQL. No config files to write, no proprietary APIs to call. diff --git a/versioned_docs/version-1.1/user-guide/deployments-administration/manage-metadata/manage-etcd.md b/versioned_docs/version-1.1/user-guide/deployments-administration/manage-metadata/manage-etcd.md index 2a4892eef3..25cb017356 100644 --- a/versioned_docs/version-1.1/user-guide/deployments-administration/manage-metadata/manage-etcd.md +++ b/versioned_docs/version-1.1/user-guide/deployments-administration/manage-metadata/manage-etcd.md @@ -47,8 +47,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "revision" -autoCompactionRetention: "100" +autoCompactionMode: "periodic" +autoCompactionRetention: "1h" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -59,8 +59,6 @@ extraEnvVars: value: "10000" ``` -This configuration uses revision-based auto compaction. Every 5 minutes, etcd checks the current revision and compacts up to `current revision - 100`. The retained history window depends on the write rate; clients that read or watch older revisions must handle compaction errors. Compaction makes space available for reuse within etcd; reclaiming disk space requires defragmentation. - Install etcd cluster: ```bash @@ -146,8 +144,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "revision" -autoCompactionRetention: "100" +autoCompactionMode: "periodic" +autoCompactionRetention: "1h" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -278,8 +276,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "revision" -autoCompactionRetention: "100" +autoCompactionMode: "periodic" +autoCompactionRetention: "1h" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -387,8 +385,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "revision" -autoCompactionRetention: "100" +autoCompactionMode: "periodic" +autoCompactionRetention: "1h" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES @@ -475,8 +473,8 @@ resources: cpu: '2' memory: 8Gi -autoCompactionMode: "revision" -autoCompactionRetention: "100" +autoCompactionMode: "periodic" +autoCompactionRetention: "1h" extraEnvVars: - name: ETCD_QUOTA_BACKEND_BYTES