diff --git a/src/server.cpp b/src/server.cpp index e7ef53d23..10cb25f2f 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -7436,6 +7436,11 @@ static void validateConfiguration() exit(EXIT_FAILURE); } + if (g_pserver->repl_diskless_load == REPL_DISKLESS_LOAD_SWAPDB && g_pserver->m_pstorageFactory) { + serverLog(LL_WARNING, "SWAPDB is not implemented when using a storage provider."); + exit(EXIT_FAILURE); + } + g_pserver->repl_backlog_size = g_pserver->repl_backlog_config_size; // this is normally set in the update logic, but not on initial config } diff --git a/tests/cluster/run.tcl b/tests/cluster/run.tcl index 7e1e91081..883313a0b 100644 --- a/tests/cluster/run.tcl +++ b/tests/cluster/run.tcl @@ -10,6 +10,16 @@ source ../../support/cluster.tcl ; # Redis Cluster client. set ::instances_count 20 ; # How many instances we use at max. set ::tlsdir "../../tls" +# Check if we compiled with flash +set status [catch {exec ../../../src/keydb-server --is-flash-enabled}] +if {$status == 0} { + puts "KeyDB was built with FLASH, including FLASH tests" + set ::flash_enabled 1 +} else { + puts "KeyDB was not built with FLASH. Excluding FLASH tests" + set ::flash_enabled 0 +} + proc main {} { parse_options spawn_instance redis $::redis_base_port $::instances_count { diff --git a/tests/cluster/tests/17-diskless-load-swapdb.tcl b/tests/cluster/tests/17-diskless-load-swapdb.tcl index 1b19a222b..8cce011d8 100644 --- a/tests/cluster/tests/17-diskless-load-swapdb.tcl +++ b/tests/cluster/tests/17-diskless-load-swapdb.tcl @@ -14,6 +14,7 @@ test "Cluster is writable" { cluster_write_test 0 } +if {!$::flash_enabled} { test "Right to restore backups when fail to diskless load " { set master [Rn 0] set replica [Rn 1] @@ -84,3 +85,4 @@ test "Right to restore backups when fail to diskless load " { assert_equal {1} [$replica get $slot0_key] assert_equal $slot0_key [$replica CLUSTER GETKEYSINSLOT 0 1] "POST RUN" } +} \ No newline at end of file