mirror of
https://github.com/redis/redis.git
synced 2026-06-09 00:33:08 -04:00
If replica detects broken connection while reading min expiration time
of hfe key, it calls exit().
Fixed it to handle the error gracefully without calling exit.
To reproduce the issue, the short-read test was modified to generate
many small hfe keys, increasing the likelihood of a connection drop
while reading min expiration time:
```tcl
for {set k 0} {$k < 50000} {incr k} {
for {set i 0} {$i < 1} {incr i} {
r hsetex "$k hfe_small" EX [expr {int(rand()*10)}] FIELDS 1 [string repeat A [expr {int(rand()*10)}]] 0[string repeat A [expr {int(rand()*10)}]]
}
}
```
We can't have the test use only hfe keys, so a few were added alongside
other data. I couldn't reproduce the issue this way but with the test's
randomization, it should hit this scenario in one of the runs.
|
||
|---|---|---|
| .. | ||
| aof-multi-part.tcl | ||
| aof-race.tcl | ||
| aof.tcl | ||
| block-repl.tcl | ||
| convert-ziplist-hash-on-load.tcl | ||
| convert-ziplist-zset-on-load.tcl | ||
| convert-zipmap-hash-on-load.tcl | ||
| corrupt-dump-fuzzer.tcl | ||
| corrupt-dump.tcl | ||
| dismiss-mem.tcl | ||
| failover.tcl | ||
| logging.tcl | ||
| psync2-master-restart.tcl | ||
| psync2-pingoff.tcl | ||
| psync2-reg.tcl | ||
| psync2.tcl | ||
| rdb.tcl | ||
| redis-benchmark.tcl | ||
| redis-cli.tcl | ||
| replication-2.tcl | ||
| replication-3.tcl | ||
| replication-4.tcl | ||
| replication-buffer.tcl | ||
| replication-psync.tcl | ||
| replication-rdbchannel.tcl | ||
| replication.tcl | ||
| shutdown.tcl | ||