[
https://issues.apache.org/jira/browse/IOTDB-3040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
刘珍 reopened IOTDB-3040:
-----------------------
master_0527_15fa098 TTL 又有新现象:
192.168.130.14机器
[cluster@i-g573lvjv logs]$ grep "by ttl " log_all.log |grep "root.test.g_44"
|tail -4
2022-05-30 10:43:51,944 [pool-12-IoTDB-TTL-Check-1] INFO
o.a.i.d.e.s.DataRegion:1677 - Removed a file
./sbin/../data/data/sequence/root.test.g_44/0/0/*{color:red}1653750006773-4771-1{color}*-0.tsfile
before Thu Aug 30 21:32:18 CST 2018 by ttl (118242693000ms)
去root.test.g_44下ll一下,可以看到4500到4801之间的300个tsfile已经被TTL删除,但是更为过期的1653704195143-2821-0-0.tsfile到1653743555186-4500-0-0.tsfile则没有被删除,产生了堆积。
-rw-rw-r-- 1 cluster cluster 1800 May 28 21:11
1653743440789-4495-0-0.tsfile.resource
-rw-rw-r-- 1 cluster cluster 14375438 May 28 21:11 1653743464051-4496-0-0.tsfile
-rw-rw-r-- 1 cluster cluster 1800 May 28 21:11
1653743464051-4496-0-0.tsfile.resource
-rw-rw-r-- 1 cluster cluster 14951671 May 28 21:12 1653743485800-4497-0-0.tsfile
-rw-rw-r-- 1 cluster cluster 1800 May 28 21:12
1653743485800-4497-0-0.tsfile.resource
-rw-rw-r-- 1 cluster cluster 14565793 May 28 21:12 1653743509895-4498-0-0.tsfile
-rw-rw-r-- 1 cluster cluster 1800 May 28 21:12
1653743509895-4498-0-0.tsfile.resource
-rw-rw-r-- 1 cluster cluster 14793436 May 28 21:12 1653743532833-4499-0-0.tsfile
-rw-rw-r-- 1 cluster cluster 1800 May 28 21:12
1653743532833-4499-0-0.tsfile.resource
-rw-rw-r-- 1 cluster cluster 14730240 May 28 21:13
1653743555186-*4500*-0-0.tsfile
-rw-rw-r-- 1 cluster cluster 1800 May 28 21:13
1653743555186-4500-0-0.tsfile.resource
-rw-rw-r-- 1 cluster cluster 46514354 May 30 02:54
1653750725577-*4801*-1-0.tsfile
-rw-rw-r-- 1 cluster cluster 1800 May 30 02:54
1653750725577-4801-1-0.tsfile.resource
-rw-rw-r-- 1 cluster cluster 46548041 May 30 02:46 1653751451969-4831-1-0.tsfile
-rw-rw-r-- 1 cluster cluster 1800 May 30 02:46
1653751451969-4831-1-0.tsfile.resource
-rw-rw-r-- 1 cluster cluster 46231288 May 30 01:56 1653752166635-4861-1-0.tsfile
-rw-rw-r-- 1 cluster cluster 1800 May 30 01:56
1653752166635-4861-1-0.tsfile.resource
> [ TTL ] Expired tsfiles with a TTL of more than 10 hours are not deleted
> ------------------------------------------------------------------------
>
> Key: IOTDB-3040
> URL: https://issues.apache.org/jira/browse/IOTDB-3040
> Project: Apache IoTDB
> Issue Type: Bug
> Components: Core/Server
> Affects Versions: 0.14.0-SNAPSHOT
> Reporter: 刘珍
> Assignee: Liuxuxin
> Priority: Major
> Labels: pull-request-available
> Attachments: config.properties, file status.png,
> iotdb-engine.properties, iotdb-env.sh, log-all-20220511.3.log.gz, log.png,
> logback.xml
>
>
> master_0427_b633df5
> 问题描述:
> 长测配置,设置TTL为24小时,
> grep ttl logs/log_all.log |tail -1
> 2022-04-29 08:57:07,404 [pool-11-IoTDB-TTL-Check-1] INFO
> o.a.i.d.e.s.DataRegion:1658 - Removed a file
> /data/iotdb_data/data/sequence/root.test.g_4/0/0/1651092583331-4021-1-0.tsfile{color:#DE350B}
> before Sat Sep 01 19:33:53 CST 2018 by ttl{color} (115392194000ms)
> ./tools/tsfileToolSet/print-tsfile-resource-files.sh
> 解析sg中第1个resource文件,查看时间戳范围,最大时间戳:
> device root.test.g_0.d_350, start time 1535749930200
> (2018-09-01T05:12:10.200+08:00[Asia/Shanghai]), {color:#DE350B}*end time
> 1535749948000 (2018-09-01T05:12:28+08:00[Asia/Shanghai])*{color}
> 有14个小时的过期文件没有被删除,磁盘空间无法释放。
> 1. 机器信息
> 私有云172.20.70.14/13 8C32G
> 数据库,bm配置文件见附件。
> 长测运行起来之后,24小时,设置TTL:
> #!/bin/bash
> #ttl默认大小24小时
> ttl=86400000
> host=127.0.0.1
> port=6667
> function setTTLOfSg(){
> input_new_ttl=$1
> ./sbin/start-cli.sh -h $host -p $port -e "set ttl to root.** $input_new_ttl"
> }
> #计算操作系统当前时间和iotdb 序列max_time的差值
> function getDiffOfTime(){
> # 操作系统当前值 秒
> os_now=`date +%s`
> max_time=`./sbin/start-cli.sh -h $host -p $port -e "show devices limit
> 1"|grep root|awk -F '|' '{print "./sbin/start-cli.sh -h " host " -p " port "
> -e \"select max_time(s_0) from " $2 " \" "}' host=$host port=$port|sh|grep "|
> "|awk -F '|' '{print $2}'`
> diffTime=$((((os_now*=1000))-max_time))
> echo $diffTime
> }
> # 2小时校正1次
> #sleep 24h
> for i in {1..40000}
> do
> getDiffOfTime
> new_ttl=$((ttl+diffTime))
> echo $new_ttl
> setTTLOfSg $new_ttl
> sleep 2h
> done
--
This message was sent by Atlassian Jira
(v8.20.7#820007)