From 7638b44d96b3b28c5395a8debbb2dfc4b14b0256 Mon Sep 17 00:00:00 2001 From: gmhdbjd Date: Thu, 27 Mar 2025 23:30:38 +0800 Subject: [PATCH 1/6] dm: add log redaction configuration item in dm worker log file --- dm/dm-worker-configuration-file.md | 5 +++++ log-redaction.md | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/dm/dm-worker-configuration-file.md b/dm/dm-worker-configuration-file.md index 48d7012f19f8f..a20c45b0818ca 100644 --- a/dm/dm-worker-configuration-file.md +++ b/dm/dm-worker-configuration-file.md @@ -19,6 +19,7 @@ name = "worker1" # Log configuration. log-level = "info" log-file = "dm-worker.log" +redact-info-log = false # DM-worker listen address. worker-addr = ":8262" @@ -53,6 +54,10 @@ cert-allowed-cn = ["dm"] - Specifies the log file directory. If this parameter is not specified, the logs are printed onto the standard output. +### `redact-info-log` New in v9.0 + +- Determines whether to log DM query arguments details in logs. + #### `worker-addr` - Specifies the address of DM-worker which provides services. You can omit the IP address and specify the port number only, such as `":8262"`. diff --git a/log-redaction.md b/log-redaction.md index 61108e93af67a..1a0b385a42eaa 100644 --- a/log-redaction.md +++ b/log-redaction.md @@ -70,3 +70,7 @@ To enable log redaction in the PD side, set the value of [`security.redact-info- ## Log redaction in TiFlash side To enable log redaction in the TiFlash side, set both the [`security.redact_info_log`](/tiflash/tiflash-configuration.md#configure-the-tiflashtoml-file) value in tiflash-server and the [`security.redact-info-log`](/tiflash/tiflash-configuration.md#configure-the-tiflash-learnertoml-file) value in tiflash-learner to `true` or `"marker"`. Both configuration values default to `false`, which means that log redaction is disabled. + +## Log redaction in DM-worker side + +To enable log redaction in the DM-worker, set the value of [`log.redact-info-log`](/dm/dm-workeriguration-file.md#redact-info-log-new-in-v90) to `true`. This configuration value defaults to `false`, which means that log redaction is disabled. From 630d5bac022c8fc4d05a0fcd509f76aca06e47b1 Mon Sep 17 00:00:00 2001 From: gmhdbjd Date: Thu, 27 Mar 2025 23:38:42 +0800 Subject: [PATCH 2/6] fix ci --- log-redaction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log-redaction.md b/log-redaction.md index 1a0b385a42eaa..efcf03b92e81d 100644 --- a/log-redaction.md +++ b/log-redaction.md @@ -73,4 +73,4 @@ To enable log redaction in the TiFlash side, set both the [`security.redact_info ## Log redaction in DM-worker side -To enable log redaction in the DM-worker, set the value of [`log.redact-info-log`](/dm/dm-workeriguration-file.md#redact-info-log-new-in-v90) to `true`. This configuration value defaults to `false`, which means that log redaction is disabled. +To enable log redaction in the DM-worker, set the value of [`log.redact-info-log`](dm/dm-workeriguration-file.md#redact-info-log-new-in-v90) to `true`. This configuration value defaults to `false`, which means that log redaction is disabled. From ad9c39a3eb5ce08ca783ed2b4f4025bf4bcdd546 Mon Sep 17 00:00:00 2001 From: gmhdbjd Date: Thu, 27 Mar 2025 23:48:07 +0800 Subject: [PATCH 3/6] fix ci --- log-redaction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log-redaction.md b/log-redaction.md index efcf03b92e81d..9525004802b21 100644 --- a/log-redaction.md +++ b/log-redaction.md @@ -73,4 +73,4 @@ To enable log redaction in the TiFlash side, set both the [`security.redact_info ## Log redaction in DM-worker side -To enable log redaction in the DM-worker, set the value of [`log.redact-info-log`](dm/dm-workeriguration-file.md#redact-info-log-new-in-v90) to `true`. This configuration value defaults to `false`, which means that log redaction is disabled. +To enable log redaction in the DM-worker, set the value of [`log.redact-info-log`](/dm/dm-worker-configuration-file.md#redact-info-log-new-in-v90) to `true`. This configuration value defaults to `false`, which means that log redaction is disabled. From b02e060205b9f75093eb02bd6a7fe04227d21859 Mon Sep 17 00:00:00 2001 From: Aolin Date: Fri, 28 Mar 2025 14:56:40 +0800 Subject: [PATCH 4/6] Apply suggestions from code review --- dm/dm-worker-configuration-file.md | 2 +- log-redaction.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dm/dm-worker-configuration-file.md b/dm/dm-worker-configuration-file.md index a20c45b0818ca..a6cbca6dcd72e 100644 --- a/dm/dm-worker-configuration-file.md +++ b/dm/dm-worker-configuration-file.md @@ -54,7 +54,7 @@ cert-allowed-cn = ["dm"] - Specifies the log file directory. If this parameter is not specified, the logs are printed onto the standard output. -### `redact-info-log` New in v9.0 +### `redact-info-log` New in v9.0.0 - Determines whether to log DM query arguments details in logs. diff --git a/log-redaction.md b/log-redaction.md index 9525004802b21..b91c50f454acd 100644 --- a/log-redaction.md +++ b/log-redaction.md @@ -73,4 +73,4 @@ To enable log redaction in the TiFlash side, set both the [`security.redact_info ## Log redaction in DM-worker side -To enable log redaction in the DM-worker, set the value of [`log.redact-info-log`](/dm/dm-worker-configuration-file.md#redact-info-log-new-in-v90) to `true`. This configuration value defaults to `false`, which means that log redaction is disabled. +To enable log redaction in the DM-worker side, set the value of [`log.redact-info-log`](/dm/dm-worker-configuration-file.md#redact-info-log-new-in-v90) to `true`. This configuration value defaults to `false`, which means that log redaction is disabled. From 63d2dc275dd8b864f04a94a45845286048bb68e3 Mon Sep 17 00:00:00 2001 From: Aolin Date: Fri, 28 Mar 2025 15:11:22 +0800 Subject: [PATCH 5/6] make ci happy --- log-redaction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log-redaction.md b/log-redaction.md index b91c50f454acd..1d5b86f56e358 100644 --- a/log-redaction.md +++ b/log-redaction.md @@ -73,4 +73,4 @@ To enable log redaction in the TiFlash side, set both the [`security.redact_info ## Log redaction in DM-worker side -To enable log redaction in the DM-worker side, set the value of [`log.redact-info-log`](/dm/dm-worker-configuration-file.md#redact-info-log-new-in-v90) to `true`. This configuration value defaults to `false`, which means that log redaction is disabled. +To enable log redaction in the DM-worker side, set the value of [`log.redact-info-log`](/dm/dm-worker-configuration-file.md#redact-info-log-new-in-v900) to `true`. This configuration value defaults to `false`, which means that log redaction is disabled. From 7a19db38fa6f731450d4a2e745d212ef4b4f6f41 Mon Sep 17 00:00:00 2001 From: Aolin Date: Fri, 18 Apr 2025 10:59:34 +0800 Subject: [PATCH 6/6] Apply suggestions from code review --- dm/dm-worker-configuration-file.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dm/dm-worker-configuration-file.md b/dm/dm-worker-configuration-file.md index a6cbca6dcd72e..93e07256aff42 100644 --- a/dm/dm-worker-configuration-file.md +++ b/dm/dm-worker-configuration-file.md @@ -56,7 +56,9 @@ cert-allowed-cn = ["dm"] ### `redact-info-log` New in v9.0.0 -- Determines whether to log DM query arguments details in logs. +- Controls whether to enable log redaction. When this configuration item is set to `true`, DM-worker logs are redacted to hide detailed DM query arguments. For more information, see [DM-worker Log Redaction](/log-redaction.md#log-redaction-in-DM-worker-side). +- Default value: `false` +- Value options: `false`, `true` #### `worker-addr`