Skip to content

[CLEAN] Synthetic Benchmark PR #14227 - Fix HINCRBYFLOAT removes field expiration on replica#103

Open
tomerqodo wants to merge 4 commits intobase_pr_14227_20260121_4919from
clean_pr_14227_20260121_4919
Open

[CLEAN] Synthetic Benchmark PR #14227 - Fix HINCRBYFLOAT removes field expiration on replica#103
tomerqodo wants to merge 4 commits intobase_pr_14227_20260121_4919from
clean_pr_14227_20260121_4919

Conversation

@tomerqodo
Copy link

Benchmark PR redis#14227

Type: Clean (correct implementation)

Original PR Title: Fix HINCRBYFLOAT removes field expiration on replica
Original PR Description: Fixes redis#14218

Before, we replicate HINCRBYFLOAT as an HSET command with the final value in order to make sure that differences in float precision or formatting will not create differences in replicas or after an AOF restart.
However, on the replica side, if the field has an expiration time, HSET will remove it, even though the master retains it. This leads to inconsistencies between the master and the replica.

For Redis 8.0 and above, PR #14224 has fixed this issue. However, Redis 7.4 does not support the HSETEX command. To address this, HINCRBYFLOAT will be replicated as a simple HSET if no expiration is set. If an expiration is specified, it will be replicated as a MULTI/EXEC containing HSET and HPEXPIREAT commands.
Original PR URL: redis#14227

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.

2 participants

Comments