Merge branch 'master' into bit-flipping-workload
This commit is contained in:
commit
078cc7ee55
|
@ -308,9 +308,16 @@ namespace SummarizeTest
|
|||
string lastFolderName = Path.GetFileName(Path.GetDirectoryName(testFile));
|
||||
if (lastFolderName.Contains("from_") || lastFolderName.Contains("to_")) // Only perform upgrade/downgrade tests from certain versions
|
||||
{
|
||||
oldBinaryVersionLowerBound = lastFolderName.Split('_').Last();
|
||||
oldBinaryVersionLowerBound = lastFolderName.Split('_').ElementAt(1); // Assuming "from_*.*.*" appears first in the folder name
|
||||
}
|
||||
string oldBinaryVersionUpperBound = getFdbserverVersion(fdbserverName);
|
||||
if (lastFolderName.Contains("until_")) // Specify upper bound for old binary; "until_*.*.*" is assumed at the end if present
|
||||
{
|
||||
string givenUpperBound = lastFolderName.Split('_').Last();
|
||||
if (versionLessThan(givenUpperBound, oldBinaryVersionUpperBound)) {
|
||||
oldBinaryVersionUpperBound = givenUpperBound;
|
||||
}
|
||||
}
|
||||
if (versionGreaterThanOrEqual("4.0.0", oldBinaryVersionUpperBound)) {
|
||||
// If the binary under test is from 3.x, then allow upgrade tests from 3.x binaries.
|
||||
oldBinaryVersionLowerBound = "0.0.0";
|
||||
|
@ -320,8 +327,22 @@ namespace SummarizeTest
|
|||
Directory.GetFiles(oldBinaryFolder),
|
||||
x => versionGreaterThanOrEqual(Path.GetFileName(x).Split('-').Last(), oldBinaryVersionLowerBound)
|
||||
&& versionLessThan(Path.GetFileName(x).Split('-').Last(), oldBinaryVersionUpperBound));
|
||||
oldBinaries = oldBinaries.Concat(currentBinary);
|
||||
oldServerName = random.Choice(oldBinaries.ToList<string>());
|
||||
if (!lastFolderName.Contains("until_")) {
|
||||
// only add current binary to the list of old binaries if "until_" is not specified in the folder name
|
||||
// <version> in until_<version> should be less or equal to the current binary version
|
||||
// otherwise, using "until_" makes no sense
|
||||
// thus, by definition, if "until_" appears, we do not want to run with the current binary version
|
||||
oldBinaries = oldBinaries.Concat(currentBinary);
|
||||
}
|
||||
List<string> oldBinariesList = oldBinaries.ToList<string>();
|
||||
if (oldBinariesList.Count == 0) {
|
||||
// In theory, restarting tests are named to have at least one old binary version to run
|
||||
// But if none of the provided old binaries fall in the range, we just skip the test
|
||||
Console.WriteLine("No available old binary version from {0} to {1}", oldBinaryVersionLowerBound, oldBinaryVersionUpperBound);
|
||||
return 0;
|
||||
} else {
|
||||
oldServerName = random.Choice(oldBinariesList);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
--index-url https://pypi.python.org/simple
|
||||
setuptools>=20.10.0
|
||||
setuptools>=20.10.0,<=57.4.0
|
||||
sphinx==1.5.6
|
||||
sphinx-bootstrap-theme==0.4.8
|
||||
docutils==0.16
|
||||
|
|
|
@ -199,7 +199,7 @@ that process, and wait for necessary data to be moved away.
|
|||
While the key is set, any commit that tries to set a key in the range will fail with the ``special_keys_api_failure`` error.
|
||||
#. ``\xff\xff/management/data_distribution/<mode|rebalance_ignored>`` Read/write. Changing these two keys will change the two corresponding system keys ``\xff/dataDistributionMode`` and ``\xff\x02/rebalanceDDIgnored``. The value of ``\xff\xff/management/data_distribution/mode`` is a literal text of ``0`` (disable) or ``1`` (enable). Transactions committed with invalid values will throw ``special_keys_api_failure`` . The value of ``\xff\xff/management/data_distribution/rebalance_ignored`` is empty. If present, it means data distribution is disabled for rebalance. Any transaction committed with non-empty value for this key will throw ``special_keys_api_failure``. For more details, see help text of ``fdbcli`` command ``datadistribution``.
|
||||
#. ``\xff\xff/management/consistency_check_suspended`` Read/write. Set or read this key will set or read the underlying system key ``\xff\x02/ConsistencyCheck/Suspend``. The value of this special key is unused thus if present, will be empty. In particular, if the key exists, then consistency is suspended. For more details, see help text of ``fdbcli`` command ``consistencycheck``.
|
||||
#. ``\xff\xff/management/db_locked`` Read/write. A single key that can be read and modified. Set the key will lock the database and clear the key will unlock. If the database is already locked, then the commit will fail with the ``special_keys_api_failure`` error. For more details, see help text of ``fdbcli`` command ``lock`` and ``unlock``.
|
||||
#. ``\xff\xff/management/db_locked`` Read/write. A single key that can be read and modified. Set the key with a 32 bytes hex string UID will lock the database and clear the key will unlock. Read the key will return the UID string as the value. If the database is already locked, then the commit will fail with the ``special_keys_api_failure`` error. For more details, see help text of ``fdbcli`` command ``lock`` and ``unlock``.
|
||||
#. ``\xff\xff/management/auto_coordinators`` Read-only. A single key, if read, will return a set of processes which is able to satisfy the current redundency level and serve as new coordinators. The return value is formatted as a comma delimited string of network addresses of coordinators, i.e. ``<ip:port>,<ip:port>,...,<ip:port>``.
|
||||
#. ``\xff\xff/management/excluded_locality/<locality>`` Read/write. Indicates that the cluster should move data away from processes matching ``<locality>``, so that they can be safely removed. See :ref:`removing machines from a cluster <removing-machines-from-a-cluster>` for documentation for the corresponding fdbcli command.
|
||||
#. ``\xff\xff/management/failed_locality/<locality>`` Read/write. Indicates that the cluster should consider matching processes as permanently failed. This allows the cluster to avoid maintaining extra state and doing extra work in the hope that these processes come back. See :ref:`removing machines from a cluster <removing-machines-from-a-cluster>` for documentation for the corresponding fdbcli command.
|
||||
|
|
|
@ -14,6 +14,7 @@ set(FDBCLI_SRCS
|
|||
ProfileCommand.actor.cpp
|
||||
SetClassCommand.actor.cpp
|
||||
SnapshotCommand.actor.cpp
|
||||
StatusCommand.actor.cpp
|
||||
SuspendCommand.actor.cpp
|
||||
ThrottleCommand.actor.cpp
|
||||
TriggerDDTeamInfoLogCommand.actor.cpp
|
||||
|
|
|
@ -51,18 +51,16 @@ ACTOR Future<bool> profileCommandActor(Reference<ITransaction> tr, std::vector<S
|
|||
fprintf(stderr, "ERROR: Addtional arguments to `get` are not supported.\n");
|
||||
return false;
|
||||
}
|
||||
state std::string sampleRateStr = "default";
|
||||
state std::string sizeLimitStr = "default";
|
||||
Optional<Value> sampleRateValue =
|
||||
wait(safeThreadFutureToFuture(tr->get(GlobalConfig::prefixedKey(fdbClientInfoTxnSampleRate))));
|
||||
if (sampleRateValue.present() &&
|
||||
!std::isinf(boost::lexical_cast<double>(sampleRateValue.get().toString()))) {
|
||||
sampleRateStr = sampleRateValue.get().toString();
|
||||
std::string sampleRateStr = "default";
|
||||
std::string sizeLimitStr = "default";
|
||||
const double sampleRateDbl = GlobalConfig::globalConfig().get<double>(
|
||||
fdbClientInfoTxnSampleRate, std::numeric_limits<double>::infinity());
|
||||
if (!std::isinf(sampleRateDbl)) {
|
||||
sampleRateStr = std::to_string(sampleRateDbl);
|
||||
}
|
||||
Optional<Value> sizeLimitValue =
|
||||
wait(safeThreadFutureToFuture(tr->get(GlobalConfig::prefixedKey(fdbClientInfoTxnSizeLimit))));
|
||||
if (sizeLimitValue.present() && boost::lexical_cast<int64_t>(sizeLimitValue.get().toString()) != -1) {
|
||||
sizeLimitStr = sizeLimitValue.get().toString();
|
||||
const int64_t sizeLimit = GlobalConfig::globalConfig().get<int64_t>(fdbClientInfoTxnSizeLimit, -1);
|
||||
if (sizeLimit != -1) {
|
||||
sizeLimitStr = boost::lexical_cast<std::string>(sizeLimit);
|
||||
}
|
||||
printf("Client profiling rate is set to %s and size limit is set to %s.\n",
|
||||
sampleRateStr.c_str(),
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "fdbclient/CoordinationInterface.h"
|
||||
#include "fdbclient/IClientApi.h"
|
||||
#include "fdbclient/StatusClient.h"
|
||||
#include "flow/Arena.h"
|
||||
|
||||
#include "flow/actorcompiler.h" // This must be the last #include.
|
||||
|
@ -93,6 +94,11 @@ ACTOR Future<Void> getWorkerInterfaces(Reference<ITransaction> tr,
|
|||
ACTOR Future<Void> verifyAndAddInterface(std::map<Key, std::pair<Value, ClientLeaderRegInterface>>* address_interface,
|
||||
Reference<FlowLock> connectLock,
|
||||
KeyValue kv);
|
||||
// print cluster status info
|
||||
void printStatus(StatusObjectReader statusObj,
|
||||
StatusClient::StatusLevel level,
|
||||
bool displayDatabaseAvailable = true,
|
||||
bool hideErrorMessages = false);
|
||||
|
||||
// All fdbcli commands (alphabetically)
|
||||
// advanceversion command
|
||||
|
@ -130,6 +136,11 @@ ACTOR Future<bool> profileCommandActor(Reference<ITransaction> tr, std::vector<S
|
|||
ACTOR Future<bool> setClassCommandActor(Reference<IDatabase> db, std::vector<StringRef> tokens);
|
||||
// snapshot command
|
||||
ACTOR Future<bool> snapshotCommandActor(Reference<IDatabase> db, std::vector<StringRef> tokens);
|
||||
// status command
|
||||
ACTOR Future<bool> statusCommandActor(Reference<IDatabase> db,
|
||||
Database localDb,
|
||||
std::vector<StringRef> tokens,
|
||||
bool isExecMode = false);
|
||||
// suspend command
|
||||
ACTOR Future<bool> suspendCommandActor(Reference<IDatabase> db,
|
||||
Reference<ITransaction> tr,
|
||||
|
|
|
@ -247,6 +247,10 @@ void ClientKnobs::initialize(Randomize randomize) {
|
|||
init( TAG_THROTTLE_RECHECK_INTERVAL, 5.0 ); if( randomize && BUGGIFY ) TAG_THROTTLE_RECHECK_INTERVAL = 0.0;
|
||||
init( TAG_THROTTLE_EXPIRATION_INTERVAL, 60.0 ); if( randomize && BUGGIFY ) TAG_THROTTLE_EXPIRATION_INTERVAL = 1.0;
|
||||
|
||||
// busyness reporting
|
||||
init( BUSYNESS_SPIKE_START_THRESHOLD, 0.100 );
|
||||
init( BUSYNESS_SPIKE_SATURATED_THRESHOLD, 0.500 );
|
||||
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
|
|
|
@ -238,6 +238,10 @@ public:
|
|||
double TAG_THROTTLE_RECHECK_INTERVAL;
|
||||
double TAG_THROTTLE_EXPIRATION_INTERVAL;
|
||||
|
||||
// busyness reporting
|
||||
double BUSYNESS_SPIKE_START_THRESHOLD;
|
||||
double BUSYNESS_SPIKE_SATURATED_THRESHOLD;
|
||||
|
||||
ClientKnobs(Randomize randomize);
|
||||
void initialize(Randomize randomize);
|
||||
};
|
||||
|
|
|
@ -92,6 +92,10 @@ public:
|
|||
// used in template functions as returned Future type
|
||||
template <class Type>
|
||||
using FutureT = ThreadFuture<Type>;
|
||||
// internal use only, return true by default
|
||||
// Only if it's a MultiVersionTransaction and the underlying transaction handler is null,
|
||||
// it will return false
|
||||
virtual bool isValid() { return true; }
|
||||
};
|
||||
|
||||
// An interface that represents a connection to a cluster made by a client
|
||||
|
|
|
@ -877,6 +877,11 @@ void MultiVersionTransaction::reset() {
|
|||
updateTransaction();
|
||||
}
|
||||
|
||||
bool MultiVersionTransaction::isValid() {
|
||||
auto tr = getTransaction();
|
||||
return tr.transaction.isValid();
|
||||
}
|
||||
|
||||
// MultiVersionDatabase
|
||||
MultiVersionDatabase::MultiVersionDatabase(MultiVersionApi* api,
|
||||
int threadIdx,
|
||||
|
|
|
@ -388,6 +388,9 @@ public:
|
|||
void addref() override { ThreadSafeReferenceCounted<MultiVersionTransaction>::addref(); }
|
||||
void delref() override { ThreadSafeReferenceCounted<MultiVersionTransaction>::delref(); }
|
||||
|
||||
// return true if the underlying transaction pointer is not empty
|
||||
bool isValid() override;
|
||||
|
||||
private:
|
||||
const Reference<MultiVersionDatabase> db;
|
||||
ThreadSpinLock lock;
|
||||
|
|
|
@ -2031,8 +2031,25 @@ ACTOR Future<Void> monitorNetworkBusyness() {
|
|||
tracker.windowedTimer = now();
|
||||
}
|
||||
|
||||
g_network->networkInfo.metrics.networkBusyness =
|
||||
std::min(elapsed, tracker.duration) / elapsed; // average duration spent doing "work"
|
||||
double busyFraction = std::min(elapsed, tracker.duration) / elapsed;
|
||||
|
||||
// The burstiness score is an indicator of the maximum busyness spike over the measurement interval.
|
||||
// It scales linearly from 0 to 1 as the largest burst goes from the start to the saturation threshold.
|
||||
// This allows us to account for saturation that happens in smaller bursts than the measurement interval.
|
||||
//
|
||||
// Burstiness will not be calculated if the saturation threshold is smaller than the start threshold or
|
||||
// if either value is negative.
|
||||
double burstiness = 0;
|
||||
if (CLIENT_KNOBS->BUSYNESS_SPIKE_START_THRESHOLD >= 0 &&
|
||||
CLIENT_KNOBS->BUSYNESS_SPIKE_SATURATED_THRESHOLD >= CLIENT_KNOBS->BUSYNESS_SPIKE_START_THRESHOLD) {
|
||||
burstiness = std::min(1.0,
|
||||
std::max(0.0, tracker.maxDuration - CLIENT_KNOBS->BUSYNESS_SPIKE_START_THRESHOLD) /
|
||||
std::max(1e-6,
|
||||
CLIENT_KNOBS->BUSYNESS_SPIKE_SATURATED_THRESHOLD -
|
||||
CLIENT_KNOBS->BUSYNESS_SPIKE_START_THRESHOLD));
|
||||
}
|
||||
|
||||
g_network->networkInfo.metrics.networkBusyness = std::max(busyFraction, burstiness);
|
||||
|
||||
tracker.duration = 0;
|
||||
tracker.maxDuration = 0;
|
||||
|
|
|
@ -1290,7 +1290,8 @@ ACTOR Future<RangeResult> getLockedKeyActor(ReadYourWritesTransaction* ryw, KeyR
|
|||
Optional<Value> val = wait(ryw->getTransaction().get(databaseLockedKey));
|
||||
RangeResult result;
|
||||
if (val.present()) {
|
||||
result.push_back_deep(result.arena(), KeyValueRef(kr.begin, val.get()));
|
||||
UID uid = UID::fromString(BinaryReader::fromStringRef<UID>(val.get().substr(10), Unversioned()).toString());
|
||||
result.push_back_deep(result.arena(), KeyValueRef(kr.begin, Value(uid.toString())));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -1313,11 +1314,10 @@ Future<RangeResult> LockDatabaseImpl::getRange(ReadYourWritesTransaction* ryw, K
|
|||
}
|
||||
}
|
||||
|
||||
ACTOR Future<Optional<std::string>> lockDatabaseCommitActor(ReadYourWritesTransaction* ryw) {
|
||||
ACTOR Future<Optional<std::string>> lockDatabaseCommitActor(ReadYourWritesTransaction* ryw, UID uid) {
|
||||
state Optional<std::string> msg;
|
||||
ryw->getTransaction().setOption(FDBTransactionOptions::LOCK_AWARE);
|
||||
Optional<Value> val = wait(ryw->getTransaction().get(databaseLockedKey));
|
||||
UID uid = deterministicRandom()->randomUniqueID();
|
||||
|
||||
if (val.present() && BinaryReader::fromStringRef<UID>(val.get().substr(10), Unversioned()) != uid) {
|
||||
// check database not locked
|
||||
|
@ -1348,7 +1348,15 @@ ACTOR Future<Optional<std::string>> unlockDatabaseCommitActor(ReadYourWritesTran
|
|||
Future<Optional<std::string>> LockDatabaseImpl::commit(ReadYourWritesTransaction* ryw) {
|
||||
auto lockId = ryw->getSpecialKeySpaceWriteMap()[SpecialKeySpace::getManagementApiCommandPrefix("lock")].second;
|
||||
if (lockId.present()) {
|
||||
return lockDatabaseCommitActor(ryw);
|
||||
std::string uidStr = lockId.get().toString();
|
||||
UID uid;
|
||||
try {
|
||||
uid = UID::fromString(uidStr);
|
||||
} catch (Error& e) {
|
||||
return Optional<std::string>(
|
||||
ManagementAPIError::toJsonString(false, "lock", "Invalid UID hex string: " + uidStr));
|
||||
}
|
||||
return lockDatabaseCommitActor(ryw, uid);
|
||||
} else {
|
||||
return unlockDatabaseCommitActor(ryw);
|
||||
}
|
||||
|
|
|
@ -3590,6 +3590,9 @@ ACTOR Future<Void> clusterRecruitFromConfiguration(ClusterControllerData* self,
|
|||
TraceEvent("RecruitFromConfigurationRetry", self->id)
|
||||
.error(e)
|
||||
.detail("GoodRecruitmentTimeReady", self->goodRecruitmentTime.isReady());
|
||||
while (!self->goodRecruitmentTime.isReady()) {
|
||||
wait(lowPriorityDelay(SERVER_KNOBS->ATTEMPT_RECRUITMENT_DELAY));
|
||||
}
|
||||
} else {
|
||||
TraceEvent(SevError, "RecruitFromConfigurationError", self->id).error(e);
|
||||
throw; // goodbye, cluster controller
|
||||
|
@ -3618,6 +3621,9 @@ ACTOR Future<Void> clusterRecruitRemoteFromConfiguration(ClusterControllerData*
|
|||
TraceEvent("RecruitRemoteFromConfigurationRetry", self->id)
|
||||
.error(e)
|
||||
.detail("GoodRecruitmentTimeReady", self->goodRemoteRecruitmentTime.isReady());
|
||||
while (!self->goodRemoteRecruitmentTime.isReady()) {
|
||||
wait(lowPriorityDelay(SERVER_KNOBS->ATTEMPT_RECRUITMENT_DELAY));
|
||||
}
|
||||
} else {
|
||||
TraceEvent(SevError, "RecruitRemoteFromConfigurationError", self->id).error(e);
|
||||
throw; // goodbye, cluster controller
|
||||
|
|
|
@ -181,6 +181,14 @@ ACTOR Future<Void> rocksDBMetricLogger(std::shared_ptr<rocksdb::Statistics> stat
|
|||
}
|
||||
}
|
||||
|
||||
void logRocksDBError(const rocksdb::Status& status, const std::string& method) {
|
||||
TraceEvent e(SevError, "RocksDBError");
|
||||
e.detail("Error", status.ToString()).detail("Method", method).detail("RocksDBSeverity", status.severity());
|
||||
if (status.IsIOError()) {
|
||||
e.detail("SubCode", status.subcode());
|
||||
}
|
||||
}
|
||||
|
||||
Error statusToError(const rocksdb::Status& s) {
|
||||
if (s.IsIOError()) {
|
||||
return io_error();
|
||||
|
@ -224,7 +232,7 @@ struct RocksDBKeyValueStore : IKeyValueStore {
|
|||
auto options = getOptions();
|
||||
auto status = rocksdb::DB::Open(options, a.path, defaultCF, &handle, &db);
|
||||
if (!status.ok()) {
|
||||
TraceEvent(SevError, "RocksDBError").detail("Error", status.ToString()).detail("Method", "Open");
|
||||
logRocksDBError(status, "Open");
|
||||
a.done.sendError(statusToError(status));
|
||||
} else {
|
||||
TraceEvent(SevInfo, "RocksDB").detail("Path", a.path).detail("Method", "Open");
|
||||
|
@ -266,7 +274,7 @@ struct RocksDBKeyValueStore : IKeyValueStore {
|
|||
options.sync = !SERVER_KNOBS->ROCKSDB_UNSAFE_AUTO_FSYNC;
|
||||
auto s = db->Write(options, a.batchToCommit.get());
|
||||
if (!s.ok()) {
|
||||
TraceEvent(SevError, "RocksDBError").detail("Error", s.ToString()).detail("Method", "Commit");
|
||||
logRocksDBError(s, "Commit");
|
||||
a.done.sendError(statusToError(s));
|
||||
} else {
|
||||
a.done.send(Void());
|
||||
|
@ -292,14 +300,14 @@ struct RocksDBKeyValueStore : IKeyValueStore {
|
|||
}
|
||||
auto s = db->Close();
|
||||
if (!s.ok()) {
|
||||
TraceEvent(SevError, "RocksDBError").detail("Error", s.ToString()).detail("Method", "Close");
|
||||
logRocksDBError(s, "Close");
|
||||
}
|
||||
if (a.deleteOnClose) {
|
||||
std::vector<rocksdb::ColumnFamilyDescriptor> defaultCF = { rocksdb::ColumnFamilyDescriptor{
|
||||
"default", getCFOptions() } };
|
||||
s = rocksdb::DestroyDB(a.path, getOptions(), defaultCF);
|
||||
if (!s.ok()) {
|
||||
TraceEvent(SevError, "RocksDBError").detail("Error", s.ToString()).detail("Method", "Destroy");
|
||||
logRocksDBError(s, "Destroy");
|
||||
} else {
|
||||
TraceEvent(SevInfo, "RocksDB").detail("Path", a.path).detail("Method", "Destroy");
|
||||
}
|
||||
|
@ -420,7 +428,7 @@ struct RocksDBKeyValueStore : IKeyValueStore {
|
|||
} else if (s.IsNotFound()) {
|
||||
a.result.send(Optional<Value>());
|
||||
} else {
|
||||
TraceEvent(SevError, "RocksDBError").detail("Error", s.ToString()).detail("Method", "ReadValuePrefix");
|
||||
logRocksDBError(s, "ReadValuePrefix");
|
||||
a.result.sendError(statusToError(s));
|
||||
}
|
||||
}
|
||||
|
@ -512,7 +520,7 @@ struct RocksDBKeyValueStore : IKeyValueStore {
|
|||
}
|
||||
|
||||
if (!s.ok()) {
|
||||
TraceEvent(SevError, "RocksDBError").detail("Error", s.ToString()).detail("Method", "ReadRange");
|
||||
logRocksDBError(s, "ReadRange");
|
||||
a.result.sendError(statusToError(s));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -242,7 +242,7 @@ class TestConfig {
|
|||
sscanf(value.c_str(), "%d", &maxTLogVersion);
|
||||
}
|
||||
if (attrib == "disableTss") {
|
||||
sscanf(value.c_str(), "%d", &disableTss);
|
||||
disableTss = strcmp(value.c_str(), "true") == 0;
|
||||
}
|
||||
if (attrib == "restartInfoLocation") {
|
||||
isFirstTestInRestart = true;
|
||||
|
|
|
@ -809,7 +809,8 @@ struct SpecialKeySpaceCorrectnessWorkload : TestWorkload {
|
|||
try {
|
||||
tx->setOption(FDBTransactionOptions::SPECIAL_KEY_SPACE_ENABLE_WRITES);
|
||||
// lock the database
|
||||
tx->set(SpecialKeySpace::getManagementApiCommandPrefix("lock"), LiteralStringRef(""));
|
||||
UID uid = deterministicRandom()->randomUniqueID();
|
||||
tx->set(SpecialKeySpace::getManagementApiCommandPrefix("lock"), uid.toString());
|
||||
// commit
|
||||
wait(tx->commit());
|
||||
break;
|
||||
|
|
|
@ -594,9 +594,9 @@ inline static int64_t flowInterlockedAnd64(int64_t* p, int64_t a) {
|
|||
#error Missing byte swap methods
|
||||
#endif
|
||||
|
||||
#define littleEndian16(value) value
|
||||
#define littleEndian32(value) value
|
||||
#define littleEndian64(value) value
|
||||
#define littleEndian16(value) uint16_t(value)
|
||||
#define littleEndian32(value) uint32_t(value)
|
||||
#define littleEndian64(value) uint64_t(value)
|
||||
|
||||
#if defined(_WIN32)
|
||||
inline static void flushOutputStreams() {
|
||||
|
|
|
@ -178,6 +178,7 @@ if(WITH_PYTHON)
|
|||
add_fdb_test(TEST_FILES rare/LargeApiCorrectnessStatus.toml)
|
||||
add_fdb_test(TEST_FILES rare/RYWDisable.toml)
|
||||
add_fdb_test(TEST_FILES rare/RandomReadWriteTest.toml)
|
||||
add_fdb_test(TEST_FILES rare/SpecificUnitTests.toml)
|
||||
add_fdb_test(TEST_FILES rare/SwizzledLargeApiCorrectness.toml)
|
||||
add_fdb_test(TEST_FILES rare/RedwoodCorrectnessBTree.toml)
|
||||
add_fdb_test(TEST_FILES rare/Throttling.toml)
|
||||
|
@ -191,29 +192,53 @@ if(WITH_PYTHON)
|
|||
TEST_FILES restarting/from_7.0.0/ConfigureTestRestart-1.txt
|
||||
restarting/from_7.0.0/ConfigureTestRestart-2.txt)
|
||||
add_fdb_test(
|
||||
TEST_FILES restarting/from_5.0.0/CycleTestRestart-1.txt
|
||||
restarting/from_5.0.0/CycleTestRestart-2.txt)
|
||||
TEST_FILES restarting/from_5.0.0_until_6.3.0/CycleTestRestart-1.txt
|
||||
restarting/from_5.0.0_until_6.3.0/CycleTestRestart-2.txt)
|
||||
add_fdb_test(
|
||||
TEST_FILES restarting/from_5.0.0/StorefrontTestRestart-1.txt
|
||||
restarting/from_5.0.0/StorefrontTestRestart-2.txt)
|
||||
TEST_FILES restarting/from_5.0.0_until_6.3.0/StorefrontTestRestart-1.txt
|
||||
restarting/from_5.0.0_until_6.3.0/StorefrontTestRestart-2.txt)
|
||||
add_fdb_test(
|
||||
TEST_FILES restarting/from_6.2.33/SnapTestAttrition-1.txt
|
||||
restarting/from_6.2.33/SnapTestAttrition-2.txt)
|
||||
TEST_FILES restarting/from_6.2.33_until_6.3.0/SnapTestAttrition-1.txt
|
||||
restarting/from_6.2.33_until_6.3.0/SnapTestAttrition-2.txt)
|
||||
add_fdb_test(
|
||||
TEST_FILES restarting/from_6.2.33/SnapTestSimpleRestart-1.txt
|
||||
restarting/from_6.2.33/SnapTestSimpleRestart-2.txt)
|
||||
TEST_FILES restarting/from_6.2.33_until_6.3.0/SnapTestSimpleRestart-1.txt
|
||||
restarting/from_6.2.33_until_6.3.0/SnapTestSimpleRestart-2.txt)
|
||||
add_fdb_test(
|
||||
TEST_FILES restarting/from_6.2.33/SnapTestRestart-1.txt
|
||||
restarting/from_6.2.33/SnapTestRestart-2.txt)
|
||||
TEST_FILES restarting/from_6.2.33_until_6.3.0/SnapTestRestart-1.txt
|
||||
restarting/from_6.2.33_until_6.3.0/SnapTestRestart-2.txt)
|
||||
add_fdb_test(
|
||||
TEST_FILES restarting/from_6.2.33/SnapCycleRestart-1.txt
|
||||
restarting/from_6.2.33/SnapCycleRestart-2.txt)
|
||||
TEST_FILES restarting/from_6.2.33_until_6.3.0/SnapCycleRestart-1.txt
|
||||
restarting/from_6.2.33_until_6.3.0/SnapCycleRestart-2.txt)
|
||||
add_fdb_test(
|
||||
TEST_FILES restarting/from_5.1.7/DrUpgradeRestart-1.txt
|
||||
restarting/from_5.1.7/DrUpgradeRestart-2.txt)
|
||||
TEST_FILES restarting/from_5.1.7_until_6.3.0/DrUpgradeRestart-1.txt
|
||||
restarting/from_5.1.7_until_6.3.0/DrUpgradeRestart-2.txt)
|
||||
add_fdb_test(
|
||||
TEST_FILES restarting/from_5.2.0/ClientTransactionProfilingCorrectness-1.txt
|
||||
restarting/from_5.2.0/ClientTransactionProfilingCorrectness-2.txt)
|
||||
TEST_FILES restarting/from_5.2.0_until_6.3.0/ClientTransactionProfilingCorrectness-1.txt
|
||||
restarting/from_5.2.0_until_6.3.0/ClientTransactionProfilingCorrectness-2.txt)
|
||||
add_fdb_test(
|
||||
TEST_FILES restarting/from_6.3.13/ClientTransactionProfilingCorrectness-1.txt
|
||||
restarting/from_6.3.13/ClientTransactionProfilingCorrectness-2.txt)
|
||||
add_fdb_test(
|
||||
TEST_FILES restarting/from_6.3.13/CycleTestRestart-1.txt
|
||||
restarting/from_6.3.13/CycleTestRestart-2.txt)
|
||||
add_fdb_test(
|
||||
TEST_FILES restarting/from_6.3.13/DrUpgradeRestart-1.txt
|
||||
restarting/from_6.3.13/DrUpgradeRestart-2.txt)
|
||||
add_fdb_test(
|
||||
TEST_FILES restarting/from_6.3.13/SnapCycleRestart-1.txt
|
||||
restarting/from_6.3.13/SnapCycleRestart-2.txt)
|
||||
add_fdb_test(
|
||||
TEST_FILES restarting/from_6.3.13/SnapTestAttrition-1.txt
|
||||
restarting/from_6.3.13/SnapTestAttrition-2.txt)
|
||||
add_fdb_test(
|
||||
TEST_FILES restarting/from_6.3.13/SnapTestRestart-1.txt
|
||||
restarting/from_6.3.13/SnapTestRestart-2.txt)
|
||||
add_fdb_test(
|
||||
TEST_FILES restarting/from_6.3.13/SnapTestSimpleRestart-1.txt
|
||||
restarting/from_6.3.13/SnapTestSimpleRestart-2.txt)
|
||||
add_fdb_test(
|
||||
TEST_FILES restarting/from_6.3.13/StorefrontTestRestart-1.txt
|
||||
restarting/from_6.3.13/StorefrontTestRestart-2.txt)
|
||||
add_fdb_test(
|
||||
TEST_FILES restarting/from_7.0.0/UpgradeAndBackupRestore-1.toml
|
||||
restarting/from_7.0.0/UpgradeAndBackupRestore-2.toml)
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
# This is modified by scripted testing tools to specify specific unit tests
|
||||
[[test]]
|
||||
testTitle = 'UnitTests'
|
||||
useDB = false
|
||||
startDelay = 0
|
||||
|
||||
[[test.workload]]
|
||||
testName = 'UnitTests'
|
||||
maxTestCases = 1
|
||||
testsMatching = '/'
|
|
@ -0,0 +1,31 @@
|
|||
testTitle=Clogged
|
||||
clearAfterTest=false
|
||||
|
||||
testName=Cycle
|
||||
transactionsPerSecond=500.0
|
||||
nodeCount=2500
|
||||
testDuration=10.0
|
||||
expectedRate=0
|
||||
|
||||
testName=RandomClogging
|
||||
testDuration=10.0
|
||||
|
||||
testName=Rollback
|
||||
meanDelay=10.0
|
||||
testDuration=10.0
|
||||
|
||||
testName=Attrition
|
||||
machinesToKill=10
|
||||
machinesToLeave=3
|
||||
reboot=true
|
||||
testDuration=10.0
|
||||
|
||||
testName=Attrition
|
||||
machinesToKill=10
|
||||
machinesToLeave=3
|
||||
reboot=true
|
||||
testDuration=10.0
|
||||
|
||||
testName=SaveAndKill
|
||||
restartInfoLocation=simfdb/restartInfo.ini
|
||||
testDuration=10.0
|
|
@ -0,0 +1,9 @@
|
|||
testTitle=StorefrontTest
|
||||
clearAfterTest=false
|
||||
testName=Storefront
|
||||
actorsPerClient=50
|
||||
itemCount=100000
|
||||
maxOrderSize=4
|
||||
testName=SaveAndKill
|
||||
restartInfoLocation=simfdb/restartInfo.ini
|
||||
testDuration=10.0
|
|
@ -0,0 +1,20 @@
|
|||
extraDB=3
|
||||
|
||||
testTitle=DrUpgrade
|
||||
clearAfterTest=false
|
||||
simBackupAgents=BackupToDB
|
||||
|
||||
testName=Cycle
|
||||
nodeCount=30000
|
||||
transactionsPerSecond=2500.0
|
||||
testDuration=30.0
|
||||
expectedRate=0
|
||||
|
||||
testName=BackupToDBUpgrade
|
||||
backupAfter=10.0
|
||||
stopDifferentialAfter=50.0
|
||||
backupRangesCount=-1
|
||||
|
||||
testName=SaveAndKill
|
||||
restartInfoLocation=simfdb/restartInfo.ini
|
||||
testDuration=40.0
|
|
@ -0,0 +1,29 @@
|
|||
testTitle=ClientTransactionProfilingCorrectness
|
||||
clearAfterTest=false
|
||||
runSetup=true
|
||||
timeout=2100
|
||||
|
||||
testName=ApiCorrectness
|
||||
numKeys=5000
|
||||
onlyLowerCase=true
|
||||
shortKeysRatio=0.5
|
||||
minShortKeyLength=1
|
||||
maxShortKeyLength=3
|
||||
minLongKeyLength=1
|
||||
maxLongKeyLength=128
|
||||
minValueLength=1
|
||||
maxValueLength=1000
|
||||
numGets=1000
|
||||
numGetRanges=100
|
||||
numGetRangeSelectors=100
|
||||
numGetKeys=100
|
||||
numClears=100
|
||||
numClearRanges=10
|
||||
maxTransactionBytes=500000
|
||||
randomTestDuration=30
|
||||
|
||||
testName=ClientTransactionProfileCorrectness
|
||||
|
||||
testName=SaveAndKill
|
||||
restartInfoLocation=simfdb/restartInfo.ini
|
||||
testDuration=60
|
|
@ -0,0 +1,21 @@
|
|||
;Take snap and do cycle test
|
||||
testTitle=SnapCyclePre
|
||||
clearAfterTest=false
|
||||
|
||||
testName=Cycle
|
||||
transactionsPerSecond=2500.0
|
||||
nodeCount=2500
|
||||
testDuration=10.0
|
||||
expectedRate=0
|
||||
|
||||
testName=SnapTest
|
||||
numSnaps=1
|
||||
maxSnapDelay=10.0
|
||||
testID=1
|
||||
|
||||
;save and shutdown
|
||||
testTitle=SnapCycleShutdown
|
||||
testName=SaveAndKill
|
||||
restartInfoLocation=simfdb/restartInfo.ini
|
||||
testDuration=10.0
|
||||
isRestoring=1
|
|
@ -0,0 +1,48 @@
|
|||
;write 1000 Keys ending with even numbers
|
||||
testTitle=SnapTestPre
|
||||
clearAfterTest=false
|
||||
|
||||
testName=SnapTest
|
||||
numSnaps=1
|
||||
maxSnapDelay=3.0
|
||||
testID=0
|
||||
|
||||
;Take snap and do read/write
|
||||
testTitle=SnapTestTakeSnap
|
||||
clearAfterTest=false
|
||||
|
||||
testName=ReadWrite
|
||||
testDuration=10.0
|
||||
transactionsPerSecond=10000
|
||||
writesPerTransactionA=0
|
||||
readsPerTransactionA=10
|
||||
writesPerTransactionB=10
|
||||
readsPerTransactionB=1
|
||||
alpha=0.5
|
||||
nodeCount=100000
|
||||
valueBytes=16
|
||||
discardEdgeMeasurements=false
|
||||
|
||||
testName=SnapTest
|
||||
numSnaps=1
|
||||
maxSnapDelay=10.0
|
||||
testID=1
|
||||
|
||||
testName=Attrition
|
||||
testDuration=10.0
|
||||
|
||||
;write 1000 Keys ending with odd numbers
|
||||
testTitle=SnapTestPost
|
||||
clearAfterTest=false
|
||||
|
||||
testName=SnapTest
|
||||
numSnaps=1
|
||||
maxSnapDelay=25.0
|
||||
testID=2
|
||||
|
||||
; save and shutdown
|
||||
testTitle=SnapSimpleShutdown
|
||||
testName=SaveAndKill
|
||||
restartInfoLocation=simfdb/restartInfo.ini
|
||||
testDuration=10.0
|
||||
isRestoring=1
|
|
@ -0,0 +1,45 @@
|
|||
;write 1000 Keys ending with even numbers
|
||||
testTitle=SnapTestPre
|
||||
clearAfterTest=false
|
||||
|
||||
testName=SnapTest
|
||||
numSnaps=1
|
||||
maxSnapDelay=3.0
|
||||
testID=0
|
||||
|
||||
;Take snap and do read/write
|
||||
testTitle=SnapTestTakeSnap
|
||||
clearAfterTest=false
|
||||
|
||||
testName=ReadWrite
|
||||
testDuration=10.0
|
||||
transactionsPerSecond=10000
|
||||
writesPerTransactionA=0
|
||||
readsPerTransactionA=10
|
||||
writesPerTransactionB=10
|
||||
readsPerTransactionB=1
|
||||
alpha=0.5
|
||||
nodeCount=100000
|
||||
valueBytes=16
|
||||
discardEdgeMeasurements=false
|
||||
|
||||
testName=SnapTest
|
||||
numSnaps=1
|
||||
maxSnapDelay=10.0
|
||||
testID=1
|
||||
|
||||
;write 1000 Keys ending with odd numbers
|
||||
testTitle=SnapTestPost
|
||||
clearAfterTest=false
|
||||
|
||||
testName=SnapTest
|
||||
numSnaps=1
|
||||
maxSnapDelay=25.0
|
||||
testID=2
|
||||
|
||||
;save and shutdown
|
||||
testTitle=SnapTestShutdown
|
||||
testName=SaveAndKill
|
||||
restartInfoLocation=simfdb/restartInfo.ini
|
||||
testDuration=10.0
|
||||
isRestoring=1
|
|
@ -0,0 +1,40 @@
|
|||
;write 1000 Keys ending with even number
|
||||
testTitle=SnapSimplePre
|
||||
clearAfterTest=false
|
||||
|
||||
testName=SnapTest
|
||||
numSnaps=1
|
||||
maxSnapDelay=30.0
|
||||
testID=0
|
||||
|
||||
;take snap
|
||||
testTitle=SnapSimpleTakeSnap
|
||||
clearAfterTest=false
|
||||
|
||||
testName=SnapTest
|
||||
numSnaps=1
|
||||
maxSnapDelay=5.0
|
||||
testID=1
|
||||
|
||||
;write 1000 Keys ending with odd number
|
||||
testTitle=SnapSimplePost
|
||||
clearAfterTest=false
|
||||
|
||||
testName=SnapTest
|
||||
numSnaps=1
|
||||
maxSnapDelay=3.0
|
||||
testID=2
|
||||
|
||||
;snapCreate with binary path that is not whitelisted
|
||||
testTitle=SnapCreateNotWhitelistedBinaryPath
|
||||
testName=SnapTest
|
||||
numSnaps=1
|
||||
maxSnapDelay=3.0
|
||||
testID=4
|
||||
|
||||
;save and shutdown
|
||||
testTitle=SnapSimpleShutdown
|
||||
testName=SaveAndKill
|
||||
restartInfoLocation=simfdb/restartInfo.ini
|
||||
testDuration=10.0
|
||||
isRestoring=1
|
|
@ -0,0 +1,26 @@
|
|||
testTitle=ClientTransactionProfilingCorrectness
|
||||
clearAfterTest=true
|
||||
timeout=2100
|
||||
runSetup=true
|
||||
|
||||
testName=ApiCorrectness
|
||||
numKeys=5000
|
||||
onlyLowerCase=true
|
||||
shortKeysRatio=0.5
|
||||
minShortKeyLength=1
|
||||
maxShortKeyLength=3
|
||||
minLongKeyLength=1
|
||||
maxLongKeyLength=128
|
||||
minValueLength=1
|
||||
maxValueLength=1000
|
||||
numGets=1000
|
||||
numGetRanges=100
|
||||
numGetRangeSelectors=100
|
||||
numGetKeys=100
|
||||
numClears=100
|
||||
numClearRanges=10
|
||||
maxTransactionBytes=500000
|
||||
randomTestDuration=60
|
||||
|
||||
testName=ClientTransactionProfileCorrectness
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
testTitle=Clogged
|
||||
runSetup=false
|
||||
|
||||
testName=Cycle
|
||||
transactionsPerSecond=2500.0
|
||||
nodeCount=2500
|
||||
testDuration=10.0
|
||||
expectedRate=0
|
||||
|
||||
testName=RandomClogging
|
||||
testDuration=10.0
|
||||
|
||||
testName=Rollback
|
||||
meanDelay=10.0
|
||||
testDuration=10.0
|
||||
|
||||
testName=Attrition
|
||||
machinesToKill=10
|
||||
machinesToLeave=3
|
||||
reboot=true
|
||||
testDuration=10.0
|
||||
|
||||
testName=Attrition
|
||||
machinesToKill=10
|
||||
machinesToLeave=3
|
||||
reboot=true
|
||||
testDuration=10.0
|
|
@ -0,0 +1,18 @@
|
|||
extraDB=3
|
||||
|
||||
testTitle=DrUpgrade
|
||||
runSetup=false
|
||||
clearAfterTest=false
|
||||
simBackupAgents=BackupToDB
|
||||
waitForQuiescenceBegin=false
|
||||
|
||||
testName=Cycle
|
||||
nodeCount=30000
|
||||
transactionsPerSecond=2500.0
|
||||
testDuration=30.0
|
||||
expectedRate=0
|
||||
|
||||
testName=BackupToDBUpgrade
|
||||
backupAfter=10.0
|
||||
backupRangesCount=-1
|
||||
stopDifferentialAfter=70.0
|
|
@ -0,0 +1,12 @@
|
|||
buggify=off
|
||||
|
||||
testTitle=SnapCycleRestore
|
||||
runSetup=false
|
||||
|
||||
;Post snap restore test
|
||||
testName=Cycle
|
||||
transactionsPerSecond=2500.0
|
||||
nodeCount=2500
|
||||
testDuration=10.0
|
||||
expectedRate=0
|
||||
enableDD=true
|
|
@ -0,0 +1,10 @@
|
|||
buggify=off
|
||||
|
||||
; verify all keys are even numbered
|
||||
testTitle=SnapTestVerify
|
||||
testName=SnapTest
|
||||
numSnaps=1
|
||||
maxSnapDelay=3.0
|
||||
testID=3
|
||||
restartInfoLocation=simfdb/restartInfo.ini
|
||||
enableDD=true
|
|
@ -0,0 +1,9 @@
|
|||
buggify=off
|
||||
|
||||
; verify all keys are even numbered
|
||||
testTitle=SnapTestVerify
|
||||
testName=SnapTest
|
||||
numSnaps=1
|
||||
maxSnapDelay=3.0
|
||||
testID=3
|
||||
enableDD=true
|
|
@ -0,0 +1,9 @@
|
|||
buggify=off
|
||||
|
||||
; verify all keys are even numbered
|
||||
testTitle=SnapSimpleVerify
|
||||
testName=SnapTest
|
||||
numSnaps=1
|
||||
maxSnapDelay=3.0
|
||||
testID=3
|
||||
enableDD=true
|
|
@ -0,0 +1,6 @@
|
|||
testTitle=StorefrontTest
|
||||
runSetup=false
|
||||
testName=Storefront
|
||||
actorsPerClient=50
|
||||
itemCount=100000
|
||||
maxOrderSize=4
|
Loading…
Reference in New Issue