If you execute:
127.0.0.1:6379> HSETEX key nx fields 1 foo bar
(integer) 1
127.0.0.1:6379> HSETEX key2 NX fields 1 foo bar
(integer) 1
The replica will see:
1767388557.168465 [0 127.0.0.1:6379] "SELECT" "0"
1767388557.168533 [0 127.0.0.1:6379] "HSETEX" "key" "nx" "fields" "1" "foo" "bar"
1767388572.586961 [0 127.0.0.1:6379] "HSETEX" "key2" "fields" "1" "foo" "bar"
Tokens should be case insensitive, so we shouldn't be replicating the NX field in the first case. (Although not sure these are really needed).
The root cause seems to be calling strcmp here:
|
if (strcmp(c->argv[i]->ptr, "NX") && |
We should be calling strcasecmp instead.
If you execute:
The replica will see:
Tokens should be case insensitive, so we shouldn't be replicating the NX field in the first case. (Although not sure these are really needed).
The root cause seems to be calling
strcmphere:valkey/src/t_hash.c
Line 1361 in 15e79ef
We should be calling
strcasecmpinstead.