You are viewing a plain text version of this content. The canonical link for it is here.
Posted to builds@kvrocks.apache.org by GitBox <gi...@apache.org> on 2026/10/16 09:14:50 UTC

[GH] (kvrocks/fix-3674-expire-overflow-v2): Workflow run "CI" failed!

The GitHub Actions job "CI" on kvrocks.git/fix-3674-expire-overflow-v2 has failed.
Run started by GitHub user shivampwm2020 (triggered by jihuayu).

Head commit for run:
766e8eb621d3c45e6d2ecac845536e21891bb9ef / Shivam Maurya <sh...@programmingwithmaurya.com>
fix(commands): reject expire times that overflow int64

Converting a user supplied expire time to milliseconds could overflow
int64: values up to INT64_MAX passed the range check and were then
multiplied by 1000 (or had the current time added), wrapping the expire
time into the past. The key was then treated as already expired, so
`SET k v EX <huge>` and `EXPIRE k <huge>` returned success and silently
removed the key.

Add a shared ToExpireAtMs helper that caps the input so neither the
seconds-to-milliseconds scaling nor the addition of the current time can
overflow, and route EX/PX/EXAT/PXAT, EXPIRE/EXPIREAT/PEXPIRE and
SETEX/PSETEX through it. Overflowing values now get an "invalid expire
time" error and the previous value is preserved.

Report URL: https://github.com/apache/kvrocks/actions/runs/38801369043

With regards,
GitHub Actions via GitBox