databaseapache-iotdb

How to prevent the previous deleted data to be restored by the database set in Apache IoTDB?


After each writing data progress in Apache IoTDB, I will delete the data of the device saved in the previous progress, and then start to insert the data of the current progress. Occasionally there will be a problem of data deleted in previous progress being restored. I checked the database operation record, and verified that the database has restored the data deleted two hours ago. I wonder if this kind of insertion process is not allowed, or what can I do to prevent the data restore happening again?


Solution

  • If you already tried to overwrite the old data with the same timestamp in Apache IoTDB, and you only need to retain the latest data for the same timestamp, you can use ttl to automatically delete the data that exceeds certain time range settings.