Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KV expiration & TTLs can only be 32-bit signed integers in practice #485

Closed
huw opened this issue Jan 30, 2023 · 0 comments · Fixed by #487
Closed

KV expiration & TTLs can only be 32-bit signed integers in practice #485

huw opened this issue Jan 30, 2023 · 0 comments · Fixed by #487

Comments

@huw
Copy link
Contributor

huw commented Jan 30, 2023

Ran into this because I accidentally sent epoch milliseconds as expiration in KV. This also happens for expirationTtl.

Reproduction

kvNamespace.put(“key”, “value”, { expiration: 1675058732043 })

Expected behaviour

In the Workers environment, this throws a TypeError:

TypeError: Value out of range. Must be between -2147483648 and 2147483647 (inclusive).

Actual behaviour

The put succeeds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant