Skip to content

Fix type of now parameter in rdbLoadObject() to use mstime_t instead of time_t#3255

Merged
ranshid merged 3 commits into
valkey-io:unstablefrom
hanxizh9910:fix/flaky-hashexpire-all-fields-expired
Feb 25, 2026
Merged

Fix type of now parameter in rdbLoadObject() to use mstime_t instead of time_t#3255
ranshid merged 3 commits into
valkey-io:unstablefrom
hanxizh9910:fix/flaky-hashexpire-all-fields-expired

Conversation

@hanxizh9910

Copy link
Copy Markdown
Contributor

Fix #3254

Problem

The now parameter in rdbLoadObject() was declared as time_t, which truncates millisecond timestamps on 32-bit systems, causing hash field expiry checks to fail during RDB load.
Reproduced: https://github.com/hanxizh9910/valkey/actions/runs/22382739246/job/64786946078

Fix

Changed time_t now → mstime_t now in the declaration and definition of rdbLoadObject().

Test run

https://github.com/hanxizh9910/valkey/actions/runs/22383363092

Signed-off-by: Hanxi Zhang <hanxizh@amazon.com>
…stamps

Signed-off-by: Hanxi Zhang <hanxizh@amazon.com>
Signed-off-by: Hanxi Zhang <hanxizh@amazon.com>
@enjoy-binbin enjoy-binbin requested a review from ranshid February 25, 2026 06:59
@ranshid ranshid merged commit c471364 into valkey-io:unstable Feb 25, 2026
57 checks passed
@codecov

codecov Bot commented Feb 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (4dee322) to head (1d1ec73).
⚠️ Report is 1 commits behind head on unstable.

Additional details and impacted files
@@       Coverage Diff        @@
##   unstable   #3255   +/-   ##
================================
================================
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

hpatro pushed a commit to hpatro/valkey that referenced this pull request Mar 5, 2026
…of time_t (valkey-io#3255)

Fix valkey-io#3254
### Problem
The now parameter in rdbLoadObject() was declared as time_t, which
truncates millisecond timestamps on 32-bit systems, causing hash field
expiry checks to fail during RDB load.
Reproduced:
https://github.com/hanxizh9910/valkey/actions/runs/22382739246/job/64786946078

### Fix

Changed time_t now → mstime_t now in the declaration and definition of
rdbLoadObject().

### Test run
https://github.com/hanxizh9910/valkey/actions/runs/22383363092

---------

Signed-off-by: Hanxi Zhang <hanxizh@amazon.com>
Signed-off-by: Harkrishn Patro <bunty.hari@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[TEST-FAILURE] Hash is skipped when all fields are expired during RDB load on primary

3 participants