Solve issues with active defrag test failing on fast machines (#11598)

We do defrag during AOF loading, but aim to detect fragmentation only
once a second, so this test aims to slow down the AOF loading and mimic
loading of a large file.
On fast machines the sleep, plus the actual work we did was insufficient
making it sleep longer so the test won't fail.

The error we used to get is this one:
Expected 0 > 100000 (context: type eval line 106 cmd {assert {$hits > 100000}} proc ::test)
This commit is contained in:
Oran Agra
2025-01-15 21:21:32 +08:00
committed by debing.sun
parent 699b6db0fc
commit 773f141504
+1 -1
View File
@@ -118,7 +118,7 @@ start_server {tags {"defrag"} overrides {appendonly yes auto-aof-rewrite-percent
if {[r config get activedefrag] eq "activedefrag yes"} {
# reset stats and load the AOF file
r config resetstat
r config set key-load-delay -50 ;# sleep on average 1/50 usec
r config set key-load-delay -25 ;# sleep on average 1/25 usec
r debug loadaof
r config set activedefrag no
# measure hits and misses right after aof loading