dragonfly icon indicating copy to clipboard operation
dragonfly copied to clipboard

chore: Limit expiry value to 32 bits.

Open romange opened this issue 4 months ago • 2 comments

We use adaptive precision, where we keep "millis" precision if we can, and switch to seconds precision if the deadline is too large.

This actually was before but now I reduced the cut-off to 4B ms, or 49 days. Also, the ttl in seconds is now limited to 4B sec, with larger values quietly rounded down to this limit.

romange avatar Sep 11 '25 14:09 romange

the next step would be to start using expire_base_ and generations to represent the absolute times using ~49 days ExpirePeriod. The absolute time := expire_base_ + expire_period so we should refresh expire_base_ daily to maintain 48-49 days span.

romange avatar Sep 17 '25 16:09 romange

Not sure if I have to start using the phrase "not sure" less 🤔

dranikpg avatar Sep 17 '25 20:09 dranikpg