Currently, HSETEX's KSN when expire-time is in the past are: 1. hset 2. hdel 3. (optional) del
and HEXPIRE: 1. hdel 2. (optional) del
We should align these, one of two options: 1. HSETEX won't send "hset" KSN in case it only deleted fields 2. HEXPIRE will send "hexpire" KSN even if expire is in the past
i vote for (1) - since the field was set and deleted in the same execution-unit, there's no point in reporting it was even set, it might confuse subscribers
here's a suggestion to correct the tests:
# hsetex sets field and ttl in the past
r hsetex myhash PX 0 FIELDS 1 f6 v6
assert_equal "pmessage * __keyspace@${db}__:myhash hdel" [$rd1 read]
assert_equal "pmessage * __keyspace@${db}__:myhash del" [$rd1 read]
r hset myhash f7 v7
assert_equal "pmessage * __keyspace@${db}__:myhash hset" [$rd1 read]
r hexpire myhash 0 FIELDS 1 f7
assert_equal "pmessage * __keyspace@${db}__:myhash hdel" [$rd1 read]
assert_equal "pmessage * __keyspace@${db}__:myhash del" [$rd1 read]
Comment From: guybe7
@oranagra @tezc can we fix it for the next release of 8.0? or is this change too "breaking"?