Unverified Commit 528bb11d authored by Oran Agra's avatar Oran Agra Committed by GitHub
Browse files

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)
parent c3fb48da
...@@ -118,7 +118,7 @@ start_server {tags {"defrag external:skip"} overrides {appendonly yes auto-aof-r ...@@ -118,7 +118,7 @@ start_server {tags {"defrag external:skip"} overrides {appendonly yes auto-aof-r
if {[r config get activedefrag] eq "activedefrag yes"} { if {[r config get activedefrag] eq "activedefrag yes"} {
# reset stats and load the AOF file # reset stats and load the AOF file
r config resetstat 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 debug loadaof
r config set activedefrag no r config set activedefrag no
# measure hits and misses right after aof loading # measure hits and misses right after aof loading
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment