diff --git a/fdbclient/ClientKnobs.cpp b/fdbclient/ClientKnobs.cpp index bb2e000b3f..9306a248f8 100644 --- a/fdbclient/ClientKnobs.cpp +++ b/fdbclient/ClientKnobs.cpp @@ -255,7 +255,7 @@ void ClientKnobs::initialize(Randomize randomize) { init( BUSYNESS_SPIKE_SATURATED_THRESHOLD, 0.500 ); // blob granules - init( ENABLE_BLOB_GRANULES, false ); + init( ENABLE_BLOB_GRANULES, true ); // clang-format on } diff --git a/fdbserver/SimulatedCluster.actor.cpp b/fdbserver/SimulatedCluster.actor.cpp index 9062c20b58..bdef5d8690 100644 --- a/fdbserver/SimulatedCluster.actor.cpp +++ b/fdbserver/SimulatedCluster.actor.cpp @@ -70,6 +70,10 @@ namespace { const int MACHINE_REBOOT_TIME = 10; +// The max number of extra blob worker machines we might (i.e. randomly) add to the simulated cluster. +// Note that this is in addition to the two we always have. +const int NUM_EXTRA_BW_MACHINES = 5; + bool destructed = false; // Configuration details specified in workload test files that change the simulation @@ -2011,16 +2015,16 @@ void setupSimulatedSystem(std::vector>* systemActors, coordinatorCount); ASSERT_LE(dcCoordinators, machines); - // FIXME: temporarily code to test storage cache + // FIXME: we hardcode some machines to specifically test storage cache and blob workers // TODO: caching disabled for this merge - if (dc == 0) { - machines++; - } + int storageCacheMachines = dc == 0 ? 1 : 0; + int blobWorkerMachines = 2 + deterministicRandom()->randomInt(0, NUM_EXTRA_BW_MACHINES + 1); - int useSeedForMachine = deterministicRandom()->randomInt(0, machines); + int totalMachines = machines + storageCacheMachines + blobWorkerMachines; + int useSeedForMachine = deterministicRandom()->randomInt(0, totalMachines); Standalone zoneId; Standalone newZoneId; - for (int machine = 0; machine < machines; machine++) { + for (int machine = 0; machine < totalMachines; machine++) { Standalone machineId(deterministicRandom()->randomUniqueID().toString()); if (machine == 0 || machineCount - dataCenters <= 4 || assignedMachines != 4 || simconfig.db.regions.size() || deterministicRandom()->random01() < 0.5) { @@ -2050,11 +2054,19 @@ void setupSimulatedSystem(std::vector>* systemActors, } } - // FIXME: temporarily code to test storage cache + // FIXME: hack to add machines specifically to test storage cache and blob workers // TODO: caching disabled for this merge - if (machine == machines - 1 && dc == 0) { - processClass = ProcessClass(ProcessClass::StorageCacheClass, ProcessClass::CommandLineSource); - nonVersatileMachines++; + // `machines` here is the normal (non-temporary) machines that totalMachines comprises of + if (machine >= machines) { + if (storageCacheMachines > 0 && dc == 0) { + processClass = ProcessClass(ProcessClass::StorageCacheClass, ProcessClass::CommandLineSource); + nonVersatileMachines++; + storageCacheMachines--; + } else if (blobWorkerMachines > 0) { // add blob workers to every DC + processClass = ProcessClass(ProcessClass::BlobWorkerClass, ProcessClass::CommandLineSource); + nonVersatileMachines++; + blobWorkerMachines--; + } } std::vector ips; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0215a95cd5..7138b8ca3a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -49,8 +49,8 @@ if(WITH_PYTHON) add_fdb_test(TEST_FILES BackupContainers.txt IGNORE) add_fdb_test(TEST_FILES BandwidthThrottle.txt IGNORE) add_fdb_test(TEST_FILES BigInsert.txt IGNORE) - add_fdb_test(TEST_FILES BlobGranuleReaderUnit.txt IGNORE) - add_fdb_test(TEST_FILES BlobManagerUnit.txt IGNORE) + add_fdb_test(TEST_FILES BlobGranuleReaderUnit.txt) + add_fdb_test(TEST_FILES BlobManagerUnit.txt) add_fdb_test(TEST_FILES ConsistencyCheck.txt IGNORE) add_fdb_test(TEST_FILES DDMetricsExclude.txt IGNORE) add_fdb_test(TEST_FILES DataDistributionMetrics.txt IGNORE) @@ -258,10 +258,10 @@ if(WITH_PYTHON) add_fdb_test(TEST_FILES slow/ApiCorrectness.toml) add_fdb_test(TEST_FILES slow/ApiCorrectnessAtomicRestore.toml) add_fdb_test(TEST_FILES slow/ApiCorrectnessSwitchover.toml) - add_fdb_test(TEST_FILES fast/BlobGranuleCorrectness.toml IGNORE) - add_fdb_test(TEST_FILES slow/BlobGranuleCorrectnessLarge.toml IGNORE) - add_fdb_test(TEST_FILES fast/BlobGranuleCorrectnessClean.toml IGNORE) - add_fdb_test(TEST_FILES slow/BlobGranuleCorrectnessLargeClean.toml IGNORE) + add_fdb_test(TEST_FILES fast/BlobGranuleCorrectness.toml) + add_fdb_test(TEST_FILES slow/BlobGranuleCorrectnessLarge.toml) + add_fdb_test(TEST_FILES fast/BlobGranuleCorrectnessClean.toml) + add_fdb_test(TEST_FILES slow/BlobGranuleCorrectnessLargeClean.toml) add_fdb_test(TEST_FILES slow/ClogWithRollbacks.toml) add_fdb_test(TEST_FILES slow/CloggedCycleTest.toml) add_fdb_test(TEST_FILES slow/CloggedStorefront.toml)