Rohit Singh
Rohit Singh

Reputation: 209

How to delete stale data from cassandra when ttl expires

I have 1 cassandra table(table1) which has some set TTL and there are other tables which are just metadata. How can I delete the stale data from metadata tables when TTL of table1 expires?

NOTE: I want to do this in my spring boot application

Upvotes: 1

Views: 138

Answers (1)

Alex Ott
Alex Ott

Reputation: 87119

There is no "event" that says that the data is expired - data is just becoming invisible. So you need to come with some condition that will be used to find outdated metadata and delete them. But correct solution would be to set TTL on the metadata as well.

Upvotes: 1

Related Questions