You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iotdb.apache.org by ja...@gmail.com on 2026/01/31 08:05:55 UTC

Fix `data loss` caused by incorrect partition table auto-cleaning in Tree Mode

Hi all,

I'd like to share a bug fix regarding the partition table auto-cleaning logic which may cause querying specific time range data will return empty result.

We discovered that the partition table was being cleaned incorrectly when only a device-level TTL was set in tree mode. This could lead to unintended data loss. We have corrected the logic so that old data partitions are deleted if and only if a database-level TTL is set, and the partition has existed longer than the maximum TTL defined under that database.

To ensure this doesn't happen again, we have also added a specific integration test for this scenario.

The PR link is: https://github.com/apache/iotdb/pull/17123

The origin issue is: https://github.com/apache/iotdb/issues/17030

Best regards,
--------------------
Yuan Tian

Re: Fix `data loss` caused by incorrect partition table auto-cleaning in Tree Mode

Posted by Yuan Tian <ja...@gmail.com>.
BTW, we will include this in 2.0.7 and 1.3.7 versions. And
@yongzao@apache.org <yo...@apache.org> will also develop a partition
table tool to automatically recover the partition table.

On Sat, Jan 31, 2026 at 4:05 PM <ja...@gmail.com> wrote:

> Hi all,
>
> I'd like to share a bug fix regarding the partition table auto-cleaning
> logic which may cause querying specific time range data will return empty
> result.
>
> We discovered that the partition table was being cleaned incorrectly when
> only a device-level TTL was set in tree mode. This could lead to unintended
> data loss. We have corrected the logic so that old data partitions are
> deleted if and only if a database-level TTL is set, and the partition has
> existed longer than the maximum TTL defined under that database.
>
> To ensure this doesn't happen again, we have also added a specific
> integration test for this scenario.
>
> The PR link is: https://github.com/apache/iotdb/pull/17123
>
> The origin issue is: https://github.com/apache/iotdb/issues/17030
>
> Best regards,
> --------------------
> Yuan Tian