-1

is there any restriction for client ttl over default-ttl of namespace. for an example ,can we set ttl while writing record to higher then default-ttl of namespace. or it can have any value irrespective of default-ttl of namespace.

1 Answers1

3

Post server version 4.9, if your namespace is configured to default settings, (default-ttl 0 & nsup-period 0), server will not accept client writes with >0 ttl.

If you want to create/update records with finite ttl (< = 10 years max), set nsup-period to > 0 seconds - enables nsup. Once nsup is enabled, you can insert records with any ttl from the client.

When updating a record which has remaining ttl - say 1 year - from client to ttl = 10 seconds, i.e. trying to set ttl below remaining life - to force expire it out of the system is a bad idea. If you restart the node, there is a 50% chance that the record will be resurrected. So, it is recommended to not set ttl from client below remaining life of the record in the server.

Special client TTL values:

-1 --> make it live-for-ever (unset ttl),

-2 --> update record without changing its current remaining TTL.

pgupta
  • 5,130
  • 11
  • 8