From 42df948a59eb51e42dec7c60ca2d4d88b7a3118b Mon Sep 17 00:00:00 2001 From: coanor Date: Fri, 1 Nov 2024 17:02:37 +0800 Subject: [PATCH] fix: update WAL default disk path Close #2444. --- internal/export/doc/zh/datakit-conf.md | 4 ++-- internal/export/non_input_docs.go | 4 ++-- internal/io/dataway/dw.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/export/doc/zh/datakit-conf.md b/internal/export/doc/zh/datakit-conf.md index 3935fa05b2..809c3cc6c0 100644 --- a/internal/export/doc/zh/datakit-conf.md +++ b/internal/export/doc/zh/datakit-conf.md @@ -332,10 +332,10 @@ Kubernetes 下部署相关配置参见[这里](datakit-daemonset-deploy.md#env-d fail_cache_clean_interval = "30s" # duration for clean fail uploaded data ``` -磁盘文件位于 Datakit 安装目录的 *data/dw-wal* 目录下: +磁盘文件位于 Datakit 安装目录的 *cache/dw-wal* 目录下: ```shell -/usr/local/datakit/data/dw-wal/ +/usr/local/datakit/cache/dw-wal/ ├── custom_object │   └── data ├── dialtesting diff --git a/internal/export/non_input_docs.go b/internal/export/non_input_docs.go index 27e0c0d127..11fcbdc996 100644 --- a/internal/export/non_input_docs.go +++ b/internal/export/non_input_docs.go @@ -219,8 +219,8 @@ func envDataway() []*inputs.ENVInfo { { ENVName: "ENV_DATAWAY_WAL_PATH", Type: doc.String, - Desc: "Set WAL disk path, default path is *data/dw-wal* under Datakit install path[:octicons-tag-24: Version-1.60.0](changelog.md#cl-1.60.0)", - DescZh: "设置 WAL 磁盘目录,默认为 Datakit 安装目录下的 *data/dw-wal* [:octicons-tag-24: Version-1.60.0](changelog.md#cl-1.60.0)", + Desc: "Set WAL disk path, default path is *cache/dw-wal* under Datakit install path[:octicons-tag-24: Version-1.60.0](changelog.md#cl-1.60.0)", + DescZh: "设置 WAL 磁盘目录,默认为 Datakit 安装目录下的 *cache/dw-wal* [:octicons-tag-24: Version-1.60.0](changelog.md#cl-1.60.0)", }, { diff --git a/internal/io/dataway/dw.go b/internal/io/dataway/dw.go index b3a6f5fb19..022378f045 100644 --- a/internal/io/dataway/dw.go +++ b/internal/io/dataway/dw.go @@ -316,7 +316,7 @@ func (dw *Dataway) doInit() error { } if dw.WAL.Path == "" { - dw.WAL.Path = filepath.Join(datakit.DataDir, "dw-wal") + dw.WAL.Path = filepath.Join(datakit.CacheDir, "dw-wal") } return nil