Hi Peichen

I'm very excited to see the implementation of device-level TTL. Before your 
work, if users wanted to set different TTLs for different devices, they had to 
model them into many databases, which was very inconvenient. After your work, 
users can set different TTLs within a single database as they wish, greatly 
enhancing the user experience for those users with TTL needs.

I am thrilled to see your work being merged and look forward to it creating 
greater value for users.

Best
----------------
Xinyu Tan

On 2024/06/03 14:10:05 BensonChou wrote:
> Hello, everyone. 
> 
> I am BensonChou(Peichen Zhou), a committer of IoTDB. Over the past few 
> months, I have implemented a new feature, which is device-level TTL, and I am 
> so excited to share this new feature with you.
> 
> Previously, IoTDB only supported database-level TTL. For devices with 
> different collection frequencies and data validity periods under a single 
> database, we want to use a more granular device-level TTL to manage the data 
> lifecycle and optimize disk space as much as possible.
> 
> The new version of IoTDB will support device-level TTL management, allowing 
> users to set, modify, and unset TTLs in bulk. When setting TTL, the system 
> will apply it to all devices that match the specified path. If multiple TTLs 
> exist on a device path, the TTL closest to the device node will take effect. 
> Once device data expires, it will no longer be queryable. While the data in 
> disk files is not guaranteed to be immediately deleted, it will eventually be 
> deleted.
> 
> The related SQL syntax is as following:
> 
> 
> 
> SET TTL TO path value. Eg: SET TTL TO ROOT.DB 36000000;
> 
> UNSET TTL TO path. Eg: UNSET TTL TO ROOT.DB;
> 
> SHOW ALL TTL
> Additionally, we have introduced the keyword `INF` to represent an infinite 
> TTL value. You can achieve more diversified configurations to meet 
> different scenarios and requirements through the configuration parameters 
> `default_ttl_in_ms`, `ttl_check_interval`, `ttl_rule_capacity
> `, `max_expired_time`, and `expired_data_ratio` in the configuration file. 
> 
> 
> Thank you for your attention and support.
> 
> Best regards,
> 
> BensonChou
> 
> Reference:
> 
> https://github.com/apache/iotdb/pull/12122

Reply via email to