Skip to content

fix(hashes): round HEXPIRETIME up to the next second - #188

Merged
MohitGoyal09 merged 5 commits into
mainfrom
fix/185-expiretime-rounding
Nov 18, 2026
Merged

MohitGoyal09 merged 5 commits into
mainfrom
fix/185-expiretime-rounding

Conversation

@MohitGoyal09

Copy link
Copy Markdown
Collaborator

Fixes #185

Redis reference: https://redis.io/docs/latest/commands/hexpiretime/

HEXPIRETIME floored the stored absolute second, so a deadline at ...500 ms reported ...48 where Redis reports ...49.

  • HEXPIRETIME now rounds the absolute millisecond deadline up to the next second; HPEXPIRETIME and HTTL are unchanged.
  • The deadline test pins ...000 and ...500 boundaries with exact replies; it fails on main.

Verification

cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test

All 40 test binaries pass.

@MohitGoyal09
MohitGoyal09 merged commit 5d33d58 into main Nov 18, 2026
6 checks passed
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 this pull request may close these issues.

HEXPIRETIME floors the stored second where Redis rounds up

1 participant