LeoPlatform / Nodejs

Nodejs SDK for the Leo Innovation Platform
MIT License
9 stars 11 forks source link

Dynamodb TTL and expiration of old events #43

Open noah-goodrich opened 6 years ago

noah-goodrich commented 6 years ago

In researching solutions for clearing old data out of the LeoEvent and LeoStream dynamodb tables, I came across the TTL feature. According to the AWS DynamoDB docs I've read, the TTL feature expects the timestamp to represent the number of seconds from the Unix epoch.

However, looking at the ttl and timestamp columns on the LeoEvent and LeoStream tables, it appears that the values are being stored in milliseconds instead.

I am looking for solutions to expire out old test data from dynamodb and this seems like the best bet. What is needed to fix both the LeoEvent and LeoStream tables so we could reliably use this feature?

roaringdev commented 6 years ago

This is indeed a bug, we will get that fixed.