First, eviction and expiration are two different mechanisms. You can disable eviction in various ways, for example, using the set-disable-eviction eviction eviction configuration parameter that you used. You cannot turn off clearing of expired records. There is a good FAQ database. What is expiration, eviction and stop loss? Unfortunately, the expired records that were cleared are gone if their empty time has passed. If these records were simply evicted (that is, deleted before their expiration due to the intersection of the upper mark of the namespace for the memory or disk), you can coldly restart your node and these records will return with a future TTL. They will not return if they were deleted for a long time or if their TTLs were in the past (such records are skipped).
Regarding TTL reset, the easiest way would be to do this through a UDF record that applies to all records in your namespace by scanning.
UDF for your situation will be very simple:
ttl.lua
function to_zero_ttl(rec) local rec_ttl = record.ttl(rec) if rec_ttl > 0 then record.set_ttl(rec, -1) aerospike:update(rec) end end
In AQL :
$ aql Aerospike Query Client Version 3.12.0 C Client Version 4.1.4 Copyright 2012-2017 Aerospike. All rights reserved. aql> register module './ttl.lua' OK, 1 module added. aql> execute ttl.to_zero_ttl() on test.foo
source share