Find records with TTL 0


#1

Hi

my aerospike cluster hitting 50% disk usage and records are started evicting. I have doubt I do not write that many records daily to the cluster.Per records we have 90days TTL set and default TTL for namespace is 30days.

What my concern is, I am assuming we have records with 0 TTL which are not getting evicted and not even being used. How do I audit and find records with 0 TTL which should be changed immediatly to default TTL.

Thanks.


Setting time-to-live(ttl)
#2

You can use the following asadm command to determine the number of records with TTL=0 3.9+:

show stat like non_expirable_objects

http://www.aerospike.com/docs/reference/metrics#non_expirable_objects

Pre-3.9:

show stat like non-expirable-objects

To find all those records, you can use asbackup and grep for it in data. Or you may have to write your own UDF to scan them based on record.ttl. Be aware that it is an intensive operation that affect your system performance. http://www.aerospike.com/docs/tools/backup/asbackup.html http://www.aerospike.com/docs/udf/api/record.html