Can I get expiration time value in Lua udf? It’s needed for more flexible TTL setting.
Yes, see the Lua API reference for all such details. The record type has the functions record.ttl(rec)
and record.set_ttl(rec, ttl)
.
Example here on how to modify the ttl of records in a set.
Thanks, but it isn’t a expiration time. I want to know how long record will alive without any updates in current udf call. Java client receive this info from Record.expiration. I tried use last_update_time and current_time for calculating this value, but decided to check, maybe this is already there
It’s seconds into the future from now, so you can add that delta and find out the actual void time. Some clients give you the absolute value, and in some it’s seconds from now.
Yep, thanks! I’m doing it now. This question for make sure that it isn’t existing out of the box