opensensorhub / osh-core

OpenSensorHub Core Modules
http://docs.opensensorhub.org
Mozilla Public License 2.0
32 stars 16 forks source link

Storage eviction should be based on DB insertion time #128

Open alexrobin opened 4 years ago

alexrobin commented 4 years ago

Evicting older records from storage should be based on the time the records are inserted in the DB rather the the timestamp included in the data.

The current behavior can cause the entire storage to be wiped out if the data is tagged with an invalid timestamp (e.g. a timestamp far in the future for data that is supposed to be dated to current time).

The bad news is that it complicates things a lot since we don't record the insertion time at present.