fixup! Enable sharded RocksDB storage engine for PhysicalShardMove
This commit is contained in:
parent
1a6114a66f
commit
5a12d12774
|
@ -2793,7 +2793,7 @@ using namespace std::literals;
|
|||
|
||||
} // namespace
|
||||
|
||||
ACTOR void setupAndRun(std::string dataFolder,
|
||||
ACTOR void simulationSetupAndRun(std::string dataFolder,
|
||||
const char* testFile,
|
||||
bool rebooting,
|
||||
bool restoring,
|
||||
|
@ -2829,7 +2829,12 @@ ACTOR void setupAndRun(std::string dataFolder,
|
|||
state bool allowDefaultTenant = testConfig.allowDefaultTenant;
|
||||
state bool allowCreatingTenants = testConfig.allowCreatingTenants;
|
||||
|
||||
if (!SERVER_KNOBS->SHARD_ENCODE_LOCATION_METADATA) {
|
||||
if (!SERVER_KNOBS->SHARD_ENCODE_LOCATION_METADATA &&
|
||||
// NOTE: PhysicalShardMove is required to have SHARDED_ROCKSDB storage engine working.
|
||||
// Inside the TOML file, the SHARD_ENCODE_LOCATION_METADATA is overridden, however, the
|
||||
// override will not take effect until the test starts. Here, we do an additional check
|
||||
// for this special simulation test.
|
||||
std::string_view(testFile).find("PhysicalShardMove") == std::string_view::npos) {
|
||||
testConfig.storageEngineExcludeTypes.insert(SimulationStorageEngine::SHARDED_ROCKSDB);
|
||||
}
|
||||
|
||||
|
|
|
@ -2336,7 +2336,8 @@ int main(int argc, char* argv[]) {
|
|||
"shard_encode_location_metadata",
|
||||
KnobValue::create(ini.GetBoolValue("META", "enableShardEncodeLocationMetadata", false)));
|
||||
}
|
||||
setupAndRun(dataFolder, opts.testFile, opts.restarting, (isRestoring >= 1), opts.whitelistBinPaths);
|
||||
simulationSetupAndRun(
|
||||
dataFolder, opts.testFile, opts.restarting, (isRestoring >= 1), opts.whitelistBinPaths);
|
||||
g_simulator->run();
|
||||
} else if (role == ServerRole::FDBD) {
|
||||
// Update the global blob credential files list so that both fast
|
||||
|
|
|
@ -22,8 +22,14 @@
|
|||
#define FDBSERVER_SIMULATEDCLUSTER_H
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
|
||||
#include "fdbclient/DatabaseConfiguration.h"
|
||||
#include "flow/Optional.h"
|
||||
|
||||
// The function at present is only called through "fdbserver -r simulation"
|
||||
void setupAndRun(std::string const& dataFolder,
|
||||
void simulationSetupAndRun(std::string const& dataFolder,
|
||||
const char* const& testFile,
|
||||
bool const& rebooting,
|
||||
bool const& restoring,
|
||||
|
|
|
@ -8,7 +8,14 @@ allowDefaultTenant = false
|
|||
disableTss = true
|
||||
|
||||
[[knobs]]
|
||||
# This knob is commented out since the knob override is done *after* the simulation system is set up. However,
|
||||
# this is not going to completely work:
|
||||
# The purpose of setting the knob to true was to enable the shard rocksdb storage engine
|
||||
# The shard rocksdb storage engine is set up before this knob is overridden
|
||||
# The temporary fix is that in SimulatedCluster.cpp:simulationSetupAndRun, we are doing one additional check
|
||||
# so for this PhysicalShardMove test, the shard RocksDB storage engine is always turned on.
|
||||
shard_encode_location_metadata = true
|
||||
|
||||
# enable_dd_physical_shard = true
|
||||
# min_byte_sampling_probability = 0.99
|
||||
# rocksdb_read_range_reuse_iterators = false
|
||||
|
|
Loading…
Reference in New Issue