Skip to content

Commit a117542

Browse files
authored
ttl is based on the timestamp of data point not the write time (#841)
1 parent bb1a1b6 commit a117542

28 files changed

+28
-24
lines changed

src/UserGuide/Master/Table/Basic-Concept/TTL-Delete-Data.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ TTL values are specified in milliseconds, and once data exceeds its defined life
3232
1. TTL defines the expiration time of data in milliseconds, independent of the time precision configuration file.
3333
2. Modifying TTL settings can cause temporary variations in data accessibility.
3434
3. The system eventually removes expired data, though this process may involve some delay.。
35+
4. The TTL expiration check is based on the data point timestamp, not the write time.
3536

3637
## 2. Set TTL
3738

src/UserGuide/Master/Tree/Basic-Concept/Operate-Metadata_apache.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ IoTDB supports device-level TTL settings, which means it is able to delete old d
248248

249249
The default unit of TTL is milliseconds. If the time precision in the configuration file changes to another, the TTL is still set to milliseconds.
250250

251-
When setting TTL, the system will look for all devices included in the set path and set TTL for these devices. The system will delete expired data at the device granularity.
251+
When setting TTL, the system will look for all devices included in the set path and set TTL for these devices. The system will delete expired data at the device granularity. The expiration check here is based on the data point timestamp, not the write time.
252252
After the device data expires, it will not be queryable. The data in the disk file cannot be guaranteed to be deleted immediately, but it can be guaranteed to be deleted eventually.
253253
However, due to operational costs, the expired data will not be physically deleted right after expiring. The physical deletion is delayed until compaction.
254254
Therefore, before the data is physically deleted, if the TTL is reduced or lifted, it may cause data that was previously invisible due to TTL to reappear.

src/UserGuide/Master/Tree/Basic-Concept/Operate-Metadata_timecho.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ IoTDB supports device-level TTL settings, which means it is able to delete old d
248248

249249
The default unit of TTL is milliseconds. If the time precision in the configuration file changes to another, the TTL is still set to milliseconds.
250250

251-
When setting TTL, the system will look for all devices included in the set path and set TTL for these devices. The system will delete expired data at the device granularity.
251+
When setting TTL, the system will look for all devices included in the set path and set TTL for these devices. The system will delete expired data at the device granularity. The expiration check here is based on the data point timestamp, not the write time.
252252
After the device data expires, it will not be queryable. The data in the disk file cannot be guaranteed to be deleted immediately, but it can be guaranteed to be deleted eventually.
253253
However, due to operational costs, the expired data will not be physically deleted right after expiring. The physical deletion is delayed until compaction.
254254
Therefore, before the data is physically deleted, if the TTL is reduced or lifted, it may cause data that was previously invisible due to TTL to reappear.

src/UserGuide/Master/Tree/Basic-Concept/TTL-Delete.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ IoTDB supports device-level TTL settings, which means it is able to delete old d
2626

2727
The default unit of TTL is milliseconds. If the time precision in the configuration file changes to another, the TTL is still set to milliseconds.
2828

29-
When setting TTL, the system will look for all devices included in the set path and set TTL for these devices. The system will delete expired data at the device granularity.
29+
When setting TTL, the system will look for all devices included in the set path and set TTL for these devices. The system will delete expired data at the device granularity. The expiration check here is based on the data point timestamp, not the write time.
3030
After the device data expires, it will not be queryable. The data in the disk file cannot be guaranteed to be deleted immediately, but it can be guaranteed to be deleted eventually.
3131
However, due to operational costs, the expired data will not be physically deleted right after expiring. The physical deletion is delayed until compaction.
3232
Therefore, before the data is physically deleted, if the TTL is reduced or lifted, it may cause data that was previously invisible due to TTL to reappear.

src/UserGuide/V1.3.x/Basic-Concept/Operate-Metadata_apache.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ IoTDB supports device-level TTL settings, which means it is able to delete old d
248248

249249
The default unit of TTL is milliseconds. If the time precision in the configuration file changes to another, the TTL is still set to milliseconds.
250250

251-
When setting TTL, the system will look for all devices included in the set path and set TTL for these devices. The system will delete expired data at the device granularity.
251+
When setting TTL, the system will look for all devices included in the set path and set TTL for these devices. The system will delete expired data at the device granularity. The expiration check here is based on the data point timestamp, not the write time.
252252
After the device data expires, it will not be queryable. The data in the disk file cannot be guaranteed to be deleted immediately, but it can be guaranteed to be deleted eventually.
253253
However, due to operational costs, the expired data will not be physically deleted right after expiring. The physical deletion is delayed until compaction.
254254
Therefore, before the data is physically deleted, if the TTL is reduced or lifted, it may cause data that was previously invisible due to TTL to reappear.

src/UserGuide/V1.3.x/Basic-Concept/Operate-Metadata_timecho.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ IoTDB supports device-level TTL settings, which means it is able to delete old d
248248

249249
The default unit of TTL is milliseconds. If the time precision in the configuration file changes to another, the TTL is still set to milliseconds.
250250

251-
When setting TTL, the system will look for all devices included in the set path and set TTL for these devices. The system will delete expired data at the device granularity.
251+
When setting TTL, the system will look for all devices included in the set path and set TTL for these devices. The system will delete expired data at the device granularity. The expiration check here is based on the data point timestamp, not the write time.
252252
After the device data expires, it will not be queryable. The data in the disk file cannot be guaranteed to be deleted immediately, but it can be guaranteed to be deleted eventually.
253253
However, due to operational costs, the expired data will not be physically deleted right after expiring. The physical deletion is delayed until compaction.
254254
Therefore, before the data is physically deleted, if the TTL is reduced or lifted, it may cause data that was previously invisible due to TTL to reappear.

src/UserGuide/V1.3.x/Basic-Concept/TTL-Delete.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ IoTDB supports device-level TTL settings, which means it is able to delete old d
2626

2727
The default unit of TTL is milliseconds. If the time precision in the configuration file changes to another, the TTL is still set to milliseconds.
2828

29-
When setting TTL, the system will look for all devices included in the set path and set TTL for these devices. The system will delete expired data at the device granularity.
29+
When setting TTL, the system will look for all devices included in the set path and set TTL for these devices. The system will delete expired data at the device granularity.The expiration check here is based on the data point timestamp, not the write time.
3030
After the device data expires, it will not be queryable. The data in the disk file cannot be guaranteed to be deleted immediately, but it can be guaranteed to be deleted eventually.
3131
However, due to operational costs, the expired data will not be physically deleted right after expiring. The physical deletion is delayed until compaction.
3232
Therefore, before the data is physically deleted, if the TTL is reduced or lifted, it may cause data that was previously invisible due to TTL to reappear.

src/UserGuide/dev-1.3/Basic-Concept/Operate-Metadata_apache.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ IoTDB supports device-level TTL settings, which means it is able to delete old d
248248

249249
The default unit of TTL is milliseconds. If the time precision in the configuration file changes to another, the TTL is still set to milliseconds.
250250

251-
When setting TTL, the system will look for all devices included in the set path and set TTL for these devices. The system will delete expired data at the device granularity.
251+
When setting TTL, the system will look for all devices included in the set path and set TTL for these devices. The system will delete expired data at the device granularity. The expiration check here is based on the data point timestamp, not the write time.
252252
After the device data expires, it will not be queryable. The data in the disk file cannot be guaranteed to be deleted immediately, but it can be guaranteed to be deleted eventually.
253253
However, due to operational costs, the expired data will not be physically deleted right after expiring. The physical deletion is delayed until compaction.
254254
Therefore, before the data is physically deleted, if the TTL is reduced or lifted, it may cause data that was previously invisible due to TTL to reappear.

src/UserGuide/dev-1.3/Basic-Concept/Operate-Metadata_timecho.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ IoTDB supports device-level TTL settings, which means it is able to delete old d
248248

249249
The default unit of TTL is milliseconds. If the time precision in the configuration file changes to another, the TTL is still set to milliseconds.
250250

251-
When setting TTL, the system will look for all devices included in the set path and set TTL for these devices. The system will delete expired data at the device granularity.
251+
When setting TTL, the system will look for all devices included in the set path and set TTL for these devices. The system will delete expired data at the device granularity. The expiration check here is based on the data point timestamp, not the write time.
252252
After the device data expires, it will not be queryable. The data in the disk file cannot be guaranteed to be deleted immediately, but it can be guaranteed to be deleted eventually.
253253
However, due to operational costs, the expired data will not be physically deleted right after expiring. The physical deletion is delayed until compaction.
254254
Therefore, before the data is physically deleted, if the TTL is reduced or lifted, it may cause data that was previously invisible due to TTL to reappear.

src/UserGuide/dev-1.3/Basic-Concept/TTL-Delete.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ IoTDB supports device-level TTL settings, which means it is able to delete old d
2626

2727
The default unit of TTL is milliseconds. If the time precision in the configuration file changes to another, the TTL is still set to milliseconds.
2828

29-
When setting TTL, the system will look for all devices included in the set path and set TTL for these devices. The system will delete expired data at the device granularity.
29+
When setting TTL, the system will look for all devices included in the set path and set TTL for these devices. The system will delete expired data at the device granularity. The expiration check here is based on the data point timestamp, not the write time.
3030
After the device data expires, it will not be queryable. The data in the disk file cannot be guaranteed to be deleted immediately, but it can be guaranteed to be deleted eventually.
3131
However, due to operational costs, the expired data will not be physically deleted right after expiring. The physical deletion is delayed until compaction.
3232
Therefore, before the data is physically deleted, if the TTL is reduced or lifted, it may cause data that was previously invisible due to TTL to reappear.

0 commit comments

Comments
 (0)