Upgrading TiDB from V5.0.1 to V6.5.3: Configured TiDB, PD, and TiKV Log Policies, but TiKV's log.file.max-days = 10 is Not Effective

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: Tidb 从V5.0.1升级至V6.5.3,配置了tidb,pd,tikv日志策略,其中tikv的log.file.max-days = 10 不生效

| username: zcxiyou

【TiDB Usage Environment】Production Environment / Testing / POC
【TiDB Version】
【Reproduction Path】What operations were performed that led to the issue
【Encountered Issue: Issue Phenomenon and Impact】
【Resource Configuration】
【Attachments: Screenshots / Logs / Monitoring】

| username: tidb菜鸟一只 | Original post link

SHOW config WHERE NAME LIKE ‘%log.file.max-days%’; Let’s see what it is.

| username: zcxiyou | Original post link

SHOW config WHERE NAME LIKE ‘%log.file.max-days%’;

| username: tidb菜鸟一只 | Original post link

Isn’t it 10 now? Any issues?

| username: zcxiyou | Original post link

However, the tikv.log of tikv has not been cleaned up.

| username: 像风一样的男子 | Original post link

Directly write a script: /usr/bin/find /tidb-deploy/tidb-3306/log/ -mtime +7 -name “tidb202 log” -exec rm -rf {} ;

| username: 大飞哥online | Original post link

Manually clean it up first. It’s estimated that the historical data hasn’t been cleaned. After the upgrade, the newly generated data will probably be cleaned.