From b59bb9b476cbcc9ed321dc5172be3ba2e0738142 Mon Sep 17 00:00:00 2001 From: yoav-steinberg Date: Mon, 21 Feb 2022 09:37:25 +0200 Subject: Fix script active defrag test (#10318) This includes two fixes: * We forgot to count non-key reallocs in defragmentation stats. * Fix the script defrag tests so to make dict entries less signigicant in fragmentation by making the scripts larger. This assures active defrage will complete and reach desired results. Some inherent fragmentation might exists in dict entries which we need to ignore. This lead to occasional CI failures. --- src/defrag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/defrag.c') diff --git a/src/defrag.c b/src/defrag.c index b0ae487f3..d4983c6d5 100644 --- a/src/defrag.c +++ b/src/defrag.c @@ -1156,7 +1156,7 @@ void activeDefragCycle(void) { /* Move on to next database, and stop if we reached the last one. */ if (++current_db >= server.dbnum) { /* defrag other items not part of the db / keys */ - defragOtherGlobals(); + server.stat_active_defrag_hits += defragOtherGlobals(); long long now = ustime(); size_t frag_bytes; -- cgit v1.2.1