From 399c2c96f0affa1cf7822b211f0b9d2f2dbcc020 Mon Sep 17 00:00:00 2001 From: sfc-gh-tclinkenbeard Date: Wed, 9 Jun 2021 11:37:14 -0700 Subject: [PATCH 01/10] Remove unnecessary std::string copies from flow --- fdbclient/DatabaseConfiguration.cpp | 8 ++++---- flow/FileTraceLogWriter.cpp | 20 ++++++++++---------- flow/FileTraceLogWriter.h | 16 ++++++++-------- flow/Histogram.cpp | 2 +- flow/Histogram.h | 8 ++++---- flow/ITrace.h | 4 ++-- flow/Platform.actor.cpp | 4 ++-- flow/Platform.h | 4 ++-- flow/SystemMonitor.cpp | 2 +- flow/SystemMonitor.h | 14 ++++++++------ flow/Trace.cpp | 14 +++++++------- flow/Trace.h | 8 ++++---- flow/flow.cpp | 6 +++--- flow/flow.h | 6 +++--- flow/network.cpp | 2 +- flow/network.h | 2 +- 16 files changed, 61 insertions(+), 59 deletions(-) diff --git a/fdbclient/DatabaseConfiguration.cpp b/fdbclient/DatabaseConfiguration.cpp index a2cfc435b3..8bb7fc90f0 100644 --- a/fdbclient/DatabaseConfiguration.cpp +++ b/fdbclient/DatabaseConfiguration.cpp @@ -533,11 +533,11 @@ bool DatabaseConfiguration::setInternal(KeyRef key, ValueRef value) { return true; // All of the above options currently require recovery to take effect } -inline static KeyValueRef* lower_bound(VectorRef& config, KeyRef const& key) { +static KeyValueRef* lower_bound(VectorRef& config, KeyRef const& key) { return std::lower_bound(config.begin(), config.end(), KeyValueRef(key, ValueRef()), KeyValueRef::OrderByKey()); } -inline static KeyValueRef const* lower_bound(VectorRef const& config, KeyRef const& key) { - return lower_bound(const_cast&>(config), key); +static KeyValueRef const* lower_bound(VectorRef const& config, KeyRef const& key) { + return std::lower_bound(config.begin(), config.end(), KeyValueRef(key, ValueRef()), KeyValueRef::OrderByKey()); } void DatabaseConfiguration::applyMutation(MutationRef m) { @@ -649,7 +649,7 @@ void DatabaseConfiguration::fromKeyValues(Standalone> raw } bool DatabaseConfiguration::isOverridden(std::string key) const { - key = configKeysPrefix.toString() + key; + key = configKeysPrefix.toString() + std::move(key); if (mutableConfiguration.present()) { return mutableConfiguration.get().find(key) != mutableConfiguration.get().end(); diff --git a/flow/FileTraceLogWriter.cpp b/flow/FileTraceLogWriter.cpp index cc402534f3..e418c2081d 100644 --- a/flow/FileTraceLogWriter.cpp +++ b/flow/FileTraceLogWriter.cpp @@ -49,7 +49,7 @@ struct IssuesListImpl { IssuesListImpl() {} - void addIssue(std::string issue) { + void addIssue(std::string const& issue) { MutexHolder h(mutex); issues.insert(issue); } @@ -61,7 +61,7 @@ struct IssuesListImpl { } } - void resolveIssue(std::string issue) { + void resolveIssue(std::string const& issue) { MutexHolder h(mutex); issues.erase(issue); } @@ -73,23 +73,23 @@ private: IssuesList::IssuesList() : impl(std::make_unique()) {} IssuesList::~IssuesList() = default; -void IssuesList::addIssue(std::string issue) { +void IssuesList::addIssue(std::string const& issue) { impl->addIssue(issue); } void IssuesList::retrieveIssues(std::set& out) const { impl->retrieveIssues(out); } -void IssuesList::resolveIssue(std::string issue) { +void IssuesList::resolveIssue(std::string const& issue) { impl->resolveIssue(issue); } -FileTraceLogWriter::FileTraceLogWriter(std::string directory, - std::string processName, - std::string basename, - std::string extension, +FileTraceLogWriter::FileTraceLogWriter(std::string const& directory, + std::string const& processName, + std::string const& basename, + std::string const& extension, uint64_t maxLogsSize, - std::function onError, - Reference issues) + std::function const& onError, + Reference const& issues) : directory(directory), processName(processName), basename(basename), extension(extension), maxLogsSize(maxLogsSize), traceFileFD(-1), index(0), onError(onError), issues(issues) {} diff --git a/flow/FileTraceLogWriter.h b/flow/FileTraceLogWriter.h index e1dbbb2060..bc6ed8c4eb 100644 --- a/flow/FileTraceLogWriter.h +++ b/flow/FileTraceLogWriter.h @@ -32,11 +32,11 @@ struct IssuesListImpl; struct IssuesList final : ITraceLogIssuesReporter, ThreadSafeReferenceCounted { IssuesList(); ~IssuesList() override; - void addIssue(std::string issue) override; + void addIssue(std::string const& issue) override; void retrieveIssues(std::set& out) const override; - void resolveIssue(std::string issue) override; + void resolveIssue(std::string const& issue) override; void addref() override { ThreadSafeReferenceCounted::addref(); } void delref() override { ThreadSafeReferenceCounted::delref(); } @@ -62,13 +62,13 @@ private: void write(const char* str, size_t size); public: - FileTraceLogWriter(std::string directory, - std::string processName, - std::string basename, - std::string extension, + FileTraceLogWriter(std::string const& directory, + std::string const& processName, + std::string const& basename, + std::string const& extension, uint64_t maxLogsSize, - std::function onError, - Reference issues); + std::function const& onError, + Reference const& issues); void addref() override; void delref() override; diff --git a/flow/Histogram.cpp b/flow/Histogram.cpp index d229511bfb..595dcc8fef 100644 --- a/flow/Histogram.cpp +++ b/flow/Histogram.cpp @@ -77,7 +77,7 @@ void HistogramRegistry::unregisterHistogram(Histogram* h) { ASSERT(count == 1); } -Histogram* HistogramRegistry::lookupHistogram(std::string name) { +Histogram* HistogramRegistry::lookupHistogram(std::string const& name) { auto h = histograms.find(name); if (h == histograms.end()) { return nullptr; diff --git a/flow/Histogram.h b/flow/Histogram.h index f730996fde..de9b6ad4d2 100644 --- a/flow/Histogram.h +++ b/flow/Histogram.h @@ -39,7 +39,7 @@ class HistogramRegistry { public: void registerHistogram(Histogram* h); void unregisterHistogram(Histogram* h); - Histogram* lookupHistogram(std::string name); + Histogram* lookupHistogram(std::string const& name); void logReport(); private: @@ -63,7 +63,7 @@ public: private: static const std::unordered_map UnitToStringMapper; - Histogram(std::string group, std::string op, Unit unit, HistogramRegistry& registry) + Histogram(std::string const& group, std::string const& op, Unit unit, HistogramRegistry& registry) : group(group), op(op), unit(unit), registry(registry), ReferenceCounted() { ASSERT(UnitToStringMapper.find(unit) != UnitToStringMapper.end()); @@ -71,7 +71,7 @@ private: clear(); } - static std::string generateName(std::string group, std::string op) { return group + ":" + op; } + static std::string generateName(std::string const& group, std::string const& op) { return group + ":" + op; } public: ~Histogram() { registry.unregisterHistogram(this); } @@ -125,7 +125,7 @@ public: } void writeToLog(); - std::string name() { return generateName(this->group, this->op); } + std::string name() const { return generateName(this->group, this->op); } std::string const group; std::string const op; diff --git a/flow/ITrace.h b/flow/ITrace.h index 9fcd7ac390..3af788ca85 100644 --- a/flow/ITrace.h +++ b/flow/ITrace.h @@ -51,8 +51,8 @@ struct ITraceLogFormatter { struct ITraceLogIssuesReporter { virtual ~ITraceLogIssuesReporter(); - virtual void addIssue(std::string issue) = 0; - virtual void resolveIssue(std::string issue) = 0; + virtual void addIssue(std::string const& issue) = 0; + virtual void resolveIssue(std::string const& issue) = 0; virtual void retrieveIssues(std::set& out) const = 0; diff --git a/flow/Platform.actor.cpp b/flow/Platform.actor.cpp index 42d8decccc..eb1a8b3392 100644 --- a/flow/Platform.actor.cpp +++ b/flow/Platform.actor.cpp @@ -1482,7 +1482,7 @@ void initPdhStrings(SystemStatisticsState* state, std::string dataFolder) { } #endif -SystemStatistics getSystemStatistics(std::string dataFolder, +SystemStatistics getSystemStatistics(std::string const& dataFolder, const IPAddress* ip, SystemStatisticsState** statState, bool logDetails) { @@ -2640,7 +2640,7 @@ Future> listDirectoriesAsync(std::string const& directory) { return findFiles(directory, "", true /* directoryOnly */, true); } -void findFilesRecursively(std::string path, std::vector& out) { +void findFilesRecursively(std::string const& path, std::vector& out) { // Add files to output, prefixing path std::vector files = platform::listFiles(path); for (auto const& f : files) diff --git a/flow/Platform.h b/flow/Platform.h index 74c9395c53..cb2e337344 100644 --- a/flow/Platform.h +++ b/flow/Platform.h @@ -232,7 +232,7 @@ struct SystemStatisticsState; struct IPAddress; -SystemStatistics getSystemStatistics(std::string dataFolder, +SystemStatistics getSystemStatistics(std::string const& dataFolder, const IPAddress* ip, SystemStatisticsState** statState, bool logDetails); @@ -369,7 +369,7 @@ std::vector listFiles(std::string const& directory, std::string con // returns directory names relative to directory std::vector listDirectories(std::string const& directory); -void findFilesRecursively(std::string path, std::vector& out); +void findFilesRecursively(std::string const& path, std::vector& out); // Tag the given file as "temporary", i.e. not really needing commits to disk void makeTemporary(const char* filename); diff --git a/flow/SystemMonitor.cpp b/flow/SystemMonitor.cpp index 37dadf9dc1..d6da40b68b 100644 --- a/flow/SystemMonitor.cpp +++ b/flow/SystemMonitor.cpp @@ -61,7 +61,7 @@ SystemStatistics getSystemStatistics() { .detail("ApproximateUnusedMemory" #size, FastAllocator::getApproximateMemoryUnused()) \ .detail("ActiveThreads" #size, FastAllocator::getActiveThreads()) -SystemStatistics customSystemMonitor(std::string eventName, StatisticsState* statState, bool machineMetrics) { +SystemStatistics customSystemMonitor(std::string const& eventName, StatisticsState* statState, bool machineMetrics) { const IPAddress ipAddr = machineState.ip.present() ? machineState.ip.get() : IPAddress(); SystemStatistics currentStats = getSystemStatistics( machineState.folder.present() ? machineState.folder.get() : "", &ipAddr, &statState->systemState, true); diff --git a/flow/SystemMonitor.h b/flow/SystemMonitor.h index 2d2470bd48..c43ca35885 100644 --- a/flow/SystemMonitor.h +++ b/flow/SystemMonitor.h @@ -36,11 +36,11 @@ struct SystemMonitorMachineState { SystemMonitorMachineState() : monitorStartTime(0) {} explicit SystemMonitorMachineState(const IPAddress& ip) : ip(ip), monitorStartTime(0) {} - SystemMonitorMachineState(std::string folder, - Optional> dcId, - Optional> zoneId, - Optional> machineId, - const IPAddress& ip) + SystemMonitorMachineState(std::string const& folder, + Optional> const& dcId, + Optional> const& zoneId, + Optional> const& machineId, + IPAddress const& ip) : folder(folder), dcId(dcId), zoneId(zoneId), machineId(machineId), ip(ip), monitorStartTime(0) {} }; @@ -148,7 +148,9 @@ struct StatisticsState { }; void systemMonitor(); -SystemStatistics customSystemMonitor(std::string eventName, StatisticsState* statState, bool machineMetrics = false); +SystemStatistics customSystemMonitor(std::string const& eventName, + StatisticsState* statState, + bool machineMetrics = false); SystemStatistics getSystemStatistics(); #endif /* FLOW_SYSTEM_MONITOR_H */ diff --git a/flow/Trace.cpp b/flow/Trace.cpp index 06c7f33ec1..84fe3f120b 100644 --- a/flow/Trace.cpp +++ b/flow/Trace.cpp @@ -503,7 +503,7 @@ public: } } - void addRole(std::string role) { + void addRole(std::string const& role) { MutexHolder holder(mutex); RoleInfo& r = mutateRoleInfo(); @@ -511,7 +511,7 @@ public: r.refreshRolesString(); } - void removeRole(std::string role) { + void removeRole(std::string const& role) { MutexHolder holder(mutex); RoleInfo& r = mutateRoleInfo(); @@ -557,13 +557,13 @@ NetworkAddress getAddressIndex() { } // This does not check for simulation, and as such is not safe for external callers -void clearPrefix_internal(std::map& data, std::string prefix) { +void clearPrefix_internal(std::map& data, std::string const& prefix) { auto first = data.lower_bound(prefix); auto last = data.lower_bound(strinc(prefix).toString()); data.erase(first, last); } -void LatestEventCache::clear(std::string prefix) { +void LatestEventCache::clear(std::string const& prefix) { clearPrefix_internal(latest[getAddressIndex()], prefix); } @@ -575,7 +575,7 @@ void LatestEventCache::set(std::string tag, const TraceEventFields& contents) { latest[getAddressIndex()][tag] = contents; } -TraceEventFields LatestEventCache::get(std::string tag) { +TraceEventFields LatestEventCache::get(std::string const& tag) { return latest[getAddressIndex()][tag]; } @@ -757,11 +757,11 @@ bool traceFileIsOpen() { return g_traceLog.isOpen(); } -void addTraceRole(std::string role) { +void addTraceRole(std::string const& role) { g_traceLog.addRole(role); } -void removeTraceRole(std::string role) { +void removeTraceRole(std::string const& role) { g_traceLog.removeRole(role); } diff --git a/flow/Trace.h b/flow/Trace.h index 4c2eadb215..5fdfb96abd 100644 --- a/flow/Trace.h +++ b/flow/Trace.h @@ -519,11 +519,11 @@ struct TraceInterval { struct LatestEventCache { public: void set(std::string tag, const TraceEventFields& fields); - TraceEventFields get(std::string tag); + TraceEventFields get(std::string const& tag); std::vector getAll(); std::vector getAllUnsafe(); - void clear(std::string prefix); + void clear(std::string const& prefix); void clear(); // Latest error tracking only tracks errors when called from the main thread. Other errors are silently ignored. @@ -577,8 +577,8 @@ bool selectTraceClockSource(std::string source); // Returns true iff source is recognized. bool validateTraceClockSource(std::string source); -void addTraceRole(std::string role); -void removeTraceRole(std::string role); +void addTraceRole(std::string const& role); +void removeTraceRole(std::string const& role); void retrieveTraceLogIssues(std::set& out); void setTraceLogGroup(const std::string& role); template diff --git a/flow/flow.cpp b/flow/flow.cpp index 74f0b334f5..6aed19fdfe 100644 --- a/flow/flow.cpp +++ b/flow/flow.cpp @@ -93,7 +93,7 @@ std::string UID::shortString() const { void detectFailureAfter(int const& address, double const& delay); -Optional parse_with_suffix(std::string toparse, std::string default_unit) { +Optional parse_with_suffix(std::string const& toparse, std::string const& default_unit) { char* endptr; uint64_t ret = strtoull(toparse.c_str(), &endptr, 10); @@ -144,7 +144,7 @@ Optional parse_with_suffix(std::string toparse, std::string default_un // m - minutes // h - hours // d - days -Optional parseDuration(std::string str, std::string defaultUnit) { +Optional parseDuration(std::string const& str, std::string const& defaultUnit) { char* endptr; uint64_t ret = strtoull(str.c_str(), &endptr, 10); @@ -284,7 +284,7 @@ std::vector P_BUGGIFIED_SECTION_FIRES{ .25, .25 }; double P_EXPENSIVE_VALIDATION = .05; -int getSBVar(std::string file, int line, BuggifyType type) { +int getSBVar(std::string const& file, int line, BuggifyType type) { if (!buggifyActivated[int(type)]) return 0; diff --git a/flow/flow.h b/flow/flow.h index e03d598d9b..baf8be9dec 100644 --- a/flow/flow.h +++ b/flow/flow.h @@ -72,7 +72,7 @@ extern double P_EXPENSIVE_VALIDATION; enum class BuggifyType : uint8_t { General = 0, Client }; bool isBuggifyEnabled(BuggifyType type); void clearBuggifySections(BuggifyType type); -int getSBVar(std::string file, int line, BuggifyType); +int getSBVar(std::string const& file, int line, BuggifyType); void enableBuggify(bool enabled, BuggifyType type); // Currently controls buggification and (randomized) expensive validation bool validationIsEnabled(BuggifyType type); @@ -83,8 +83,8 @@ bool validationIsEnabled(BuggifyType type); #define EXPENSIVE_VALIDATION \ (validationIsEnabled(BuggifyType::General) && deterministicRandom()->random01() < P_EXPENSIVE_VALIDATION) -extern Optional parse_with_suffix(std::string toparse, std::string default_unit = ""); -extern Optional parseDuration(std::string str, std::string defaultUnit = ""); +extern Optional parse_with_suffix(std::string const& toparse, std::string const& default_unit = ""); +extern Optional parseDuration(std::string const& str, std::string const& defaultUnit = ""); extern std::string format(const char* form, ...); // On success, returns the number of characters written. On failure, returns a negative number. diff --git a/flow/network.cpp b/flow/network.cpp index 9dc71cdc7d..f50bbc6060 100644 --- a/flow/network.cpp +++ b/flow/network.cpp @@ -46,7 +46,7 @@ std::string IPAddress::toString() const { } } -Optional IPAddress::parse(std::string str) { +Optional IPAddress::parse(std::string const& str) { try { auto addr = boost::asio::ip::address::from_string(str); return addr.is_v6() ? IPAddress(addr.to_v6().to_bytes()) : IPAddress(addr.to_v4().to_ulong()); diff --git a/flow/network.h b/flow/network.h index 1eeb5bdc2d..8760ff484f 100644 --- a/flow/network.h +++ b/flow/network.h @@ -150,7 +150,7 @@ public: const IPAddressStore& toV6() const { return std::get(addr); } std::string toString() const; - static Optional parse(std::string str); + static Optional parse(std::string const& str); bool operator==(const IPAddress& addr) const; bool operator!=(const IPAddress& addr) const; From 04694a6f706f36d846f71db24954f8f51cc08111 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Wed, 9 Jun 2021 16:21:50 -0700 Subject: [PATCH 02/10] Respect JOSHUA_SEED if set Closes #4913 --- contrib/TestHarness/Program.cs.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/TestHarness/Program.cs.cmake b/contrib/TestHarness/Program.cs.cmake index 075a2758d6..767af1fa5f 100644 --- a/contrib/TestHarness/Program.cs.cmake +++ b/contrib/TestHarness/Program.cs.cmake @@ -51,9 +51,10 @@ namespace SummarizeTest bool traceToStdout = false; try { + string joshuaSeed = System.Environment.GetEnvironmentVariable("JOSHUA_SEED"); byte[] seed = new byte[4]; new System.Security.Cryptography.RNGCryptoServiceProvider().GetBytes(seed); - random = new Random(new BinaryReader(new MemoryStream(seed)).ReadInt32()); + random = new Random(joshuaSeed != null ? Int32.Parse(joshuaSeed) : new BinaryReader(new MemoryStream(seed)).ReadInt32()); if (args.Length < 1) return UsageMessage(); From 948f4993b968661c794e93e131f9fd9e8cdade79 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Wed, 9 Jun 2021 17:07:45 -0700 Subject: [PATCH 03/10] Convert to 32 bit int --- contrib/TestHarness/Program.cs.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/TestHarness/Program.cs.cmake b/contrib/TestHarness/Program.cs.cmake index 767af1fa5f..c9edc4f29b 100644 --- a/contrib/TestHarness/Program.cs.cmake +++ b/contrib/TestHarness/Program.cs.cmake @@ -54,7 +54,7 @@ namespace SummarizeTest string joshuaSeed = System.Environment.GetEnvironmentVariable("JOSHUA_SEED"); byte[] seed = new byte[4]; new System.Security.Cryptography.RNGCryptoServiceProvider().GetBytes(seed); - random = new Random(joshuaSeed != null ? Int32.Parse(joshuaSeed) : new BinaryReader(new MemoryStream(seed)).ReadInt32()); + random = new Random(joshuaSeed != null ? Convert.ToInt32(Int64.Parse(joshuaSeed) % 2147483648) : new BinaryReader(new MemoryStream(seed)).ReadInt32()); if (args.Length < 1) return UsageMessage(); From 3524ceeb09d6d4ff63fb9ff100693b940d6cf46b Mon Sep 17 00:00:00 2001 From: "A.J. Beamon" Date: Thu, 10 Jun 2021 15:24:42 -0700 Subject: [PATCH 04/10] Fix some documentation rendering issues around the estimated range size bytes and similar functions. --- documentation/sphinx/source/api-c.rst | 4 ++++ documentation/sphinx/source/api-python.rst | 11 ++++------- documentation/sphinx/source/api-ruby.rst | 3 ++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/documentation/sphinx/source/api-c.rst b/documentation/sphinx/source/api-c.rst index 0acafea8ba..5d746eff7a 100644 --- a/documentation/sphinx/source/api-c.rst +++ b/documentation/sphinx/source/api-c.rst @@ -541,13 +541,17 @@ Applications must provide error handling and an appropriate retry loop around th |snapshot| .. function:: FDBFuture* fdb_transaction_get_estimated_range_size_bytes( FDBTransaction* tr, uint8_t const* begin_key_name, int begin_key_name_length, uint8_t const* end_key_name, int end_key_name_length) + Returns an estimated byte size of the key range. + .. note:: The estimated size is calculated based on the sampling done by FDB server. The sampling algorithm works roughly in this way: the larger the key-value pair is, the more likely it would be sampled and the more accurate its sampled size would be. And due to that reason it is recommended to use this API to query against large ranges for accuracy considerations. For a rough reference, if the returned size is larger than 3MB, one can consider the size to be accurate. |future-return0| the estimated size of the key range given. |future-return1| call :func:`fdb_future_get_int64()` to extract the size, |future-return2| .. function:: FDBFuture* fdb_transaction_get_range_split_points( FDBTransaction* tr, uint8_t const* begin_key_name, int begin_key_name_length, uint8_t const* end_key_name, int end_key_name_length, int64_t chunk_size) + Returns a list of keys that can split the given range into (roughly) equally sized chunks based on ``chunk_size``. + .. note:: The returned split points contain the start key and end key of the given range |future-return0| the list of split points. |future-return1| call :func:`fdb_future_get_key_array()` to extract the array, |future-return2| diff --git a/documentation/sphinx/source/api-python.rst b/documentation/sphinx/source/api-python.rst index 0cd1e8f078..2897be0153 100644 --- a/documentation/sphinx/source/api-python.rst +++ b/documentation/sphinx/source/api-python.rst @@ -800,6 +800,7 @@ Transaction misc functions .. method:: Transaction.get_estimated_range_size_bytes(begin_key, end_key) Gets the estimated byte size of the given key range. Returns a :class:`FutureInt64`. + .. note:: The estimated size is calculated based on the sampling done by FDB server. The sampling algorithm works roughly in this way: the larger the key-value pair is, the more likely it would be sampled and the more accurate its sampled size would be. And due to that reason it is recommended to use this API to query against large ranges for accuracy considerations. For a rough reference, if the returned size is larger than 3MB, one can consider the size to be accurate. .. method:: Transaction.get_range_split_points(self, begin_key, end_key, chunk_size) @@ -807,15 +808,11 @@ Transaction misc functions Gets a list of keys that can split the given range into (roughly) equally sized chunks based on ``chunk_size``. Returns a :class:`FutureKeyArray`. .. note:: The returned split points contain the start key and end key of the given range - -.. _api-python-transaction-options: - -Transaction misc functions --------------------------- - .. method:: Transaction.get_approximate_size() - |transaction-get-approximate-size-blurb|. Returns a :class:`FutureInt64`. + |transaction-get-approximate-size-blurb| Returns a :class:`FutureInt64`. + +.. _api-python-transaction-options: Transaction options ------------------- diff --git a/documentation/sphinx/source/api-ruby.rst b/documentation/sphinx/source/api-ruby.rst index ddb721a0d0..4d92b5ea0e 100644 --- a/documentation/sphinx/source/api-ruby.rst +++ b/documentation/sphinx/source/api-ruby.rst @@ -744,6 +744,7 @@ Transaction misc functions .. method:: Transaction.get_estimated_range_size_bytes(begin_key, end_key) -> Int64Future Gets the estimated byte size of the given key range. Returns a :class:`Int64Future`. + .. note:: The estimated size is calculated based on the sampling done by FDB server. The sampling algorithm works roughly in this way: the larger the key-value pair is, the more likely it would be sampled and the more accurate its sampled size would be. And due to that reason it is recommended to use this API to query against large ranges for accuracy considerations. For a rough reference, if the returned size is larger than 3MB, one can consider the size to be accurate. .. method:: Transaction.get_range_split_points(begin_key, end_key, chunk_size) -> FutureKeyArray @@ -753,7 +754,7 @@ Transaction misc functions .. method:: Transaction.get_approximate_size() -> Int64Future - |transaction-get-approximate-size-blurb|. Returns a :class:`Int64Future`. + |transaction-get-approximate-size-blurb| Returns a :class:`Int64Future`. Transaction options ------------------- From 4f29b94c61d820ef7e509178e1bf2c7c5d59933a Mon Sep 17 00:00:00 2001 From: Jingyu Zhou Date: Sat, 12 Jun 2021 17:27:00 -0700 Subject: [PATCH 05/10] Fix TraceEventOverflow error in HealthMetricsApi workload --- fdbserver/workloads/HealthMetricsApi.actor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/fdbserver/workloads/HealthMetricsApi.actor.cpp b/fdbserver/workloads/HealthMetricsApi.actor.cpp index 9566514b04..ec22baa1a2 100644 --- a/fdbserver/workloads/HealthMetricsApi.actor.cpp +++ b/fdbserver/workloads/HealthMetricsApi.actor.cpp @@ -168,6 +168,7 @@ struct HealthMetricsApiWorkload : TestWorkload { traceDiskUsage.detail(format("Storage-%s", ss.first.toString().c_str()), storageStats.diskUsage); } TraceEvent traceTLogQueue("TLogQueue"); + traceTLogQueue.setMaxFieldLength(10000).setMaxEventLength(11000); for (const auto& ss : healthMetrics.tLogQueue) { self->detailedWorstTLogQueue = std::max(self->detailedWorstTLogQueue, ss.second); traceTLogQueue.detail(format("TLog-%s", ss.first.toString().c_str()), ss.second); From 4a9b0cc25862183364fac3aaeb968a5f5466ca6c Mon Sep 17 00:00:00 2001 From: sfc-gh-tclinkenbeard Date: Sun, 13 Jun 2021 09:57:02 -0700 Subject: [PATCH 06/10] Add 7.0 release notes for PRs by sfc-gh-tclinkenbeard --- .../source/release-notes/release-notes-700.rst | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/documentation/sphinx/source/release-notes/release-notes-700.rst b/documentation/sphinx/source/release-notes/release-notes-700.rst index 7b0a24474d..aff2b0c1af 100644 --- a/documentation/sphinx/source/release-notes/release-notes-700.rst +++ b/documentation/sphinx/source/release-notes/release-notes-700.rst @@ -10,12 +10,14 @@ Release Notes Features -------- * Added a new API in all bindings that can be used to get a list of split points that will split the given range into (roughly) equally sized chunks. `(PR #3394) `_ - +* Added support for writing backup files directly to Azure blob storage. This is not yet performance tested on large-scale clusters. `(PR #3961) `_ Performance ----------- - +* Improved Deque copy performance. `(PR #3197) `_ * Increased performance of dr_agent when copying the mutation log. The ``COPY_LOG_BLOCK_SIZE``, ``COPY_LOG_BLOCKS_PER_TASK``, ``COPY_LOG_PREFETCH_BLOCKS``, ``COPY_LOG_READ_AHEAD_BYTES`` and ``COPY_LOG_TASK_DURATION_NANOS`` knobs can be set. `(PR #3436) `_ +* Added multiple new microbenchmarks for PromiseStream, Reference, IRandom, and timer, as well as support for benchmarking actors. `(PR #3590) `_ +* Use xxhash3 for SQLite page checksums. `(PR #4075) `_ * Reduced the number of connections required by the multi-version client when loading external clients. When connecting to 7.0 clusters, only one connection with version 6.2 or larger will be used. With older clusters, at most two connections with version 6.2 or larger will be used. Clients older than version 6.2 will continue to create an additional connection each. `(PR #4667) `_ * Reduce CPU overhead of load balancing on client processes. `(PR #4561) `_ @@ -31,6 +33,7 @@ Fixes Status ------ +* Added limiting metrics (limiting_storage_durability_lag and limiting_storage_queue) to health metrics. `(PR #4067) `_ * Added ``commit_batching_window_size`` to the proxy roles section of status to record statistics about commit batching window size on each proxy. `(PR #4735) `_ * Added ``cluster.bounce_impact`` section to status to report if there will be any extra effects when bouncing the cluster, and if so, the reason for those effects. `(PR #4770) `_ * Added ``fetched_versions`` to the storage metrics section of status to report how fast a storage server is catching up in versions. `(PR #4770) `_ @@ -41,15 +44,17 @@ Bindings -------- * Python: The function ``get_estimated_range_size_bytes`` will now throw an error if the ``begin_key`` or ``end_key`` is ``None``. `(PR #3394) `_ * C: Added a function, ``fdb_database_reboot_worker``, to reboot or suspend the specified process. `(PR #4094) `_ -* C: Added a function, ``fdb_database_force_recovery_with_data_loss``, to force the database to recover into the given datacenter. `(PR #4420) `_ -* C: Added a function, ``fdb_database_create_snapshot``, to create a snapshot of the database. `(PR #4241) `_ +* C: Added a function, ``fdb_database_force_recovery_with_data_loss``, to force the database to recover into the given datacenter. `(PR #4220) `_ +* C: Added a function, ``fdb_database_create_snapshot``, to create a snapshot of the database. `(PR #4241) `_ * C: Added ``fdb_database_get_main_thread_busyness`` function to report how busy a client's main thread is. `(PR #4504) `_ -* Java: Added ``Database.getMainThreadBusyness`` function to report how busy a client's main thread is. `(PR #4564) `_ +* Java: Added ``Database.getMainThreadBusyness`` function to report how busy a client's main thread is. `(PR #4564) `_ Other Changes ------------- * When ``fdbmonitor`` dies, all of its child processes are now killed. `(PR #3841) `_ * The ``foundationdb`` service installed by the RPM packages will now automatically restart ``fdbmonitor`` after 60 seconds when it fails. `(PR #3841) `_ +* Capture output of forked snapshot processes in trace events. `(PR #4254) `_ +* Add ErrorKind field to Severity 40 trace events. `(PR #4741) `_ Earlier release notes --------------------- From 8af0affeff61f90b89f409540b7182e721906eaf Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Fri, 11 Jun 2021 18:31:44 -0400 Subject: [PATCH 07/10] Add support for running non-simulation tests on Joshua --- contrib/TestHarness/Program.cs.cmake | 38 ++++++++++++++++-------- fdbserver/KeyValueStoreRocksDB.actor.cpp | 2 +- tests/CMakeLists.txt | 1 + 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/contrib/TestHarness/Program.cs.cmake b/contrib/TestHarness/Program.cs.cmake index 075a2758d6..5081031fe6 100644 --- a/contrib/TestHarness/Program.cs.cmake +++ b/contrib/TestHarness/Program.cs.cmake @@ -246,6 +246,7 @@ namespace SummarizeTest string testFile = null; string testDir = ""; string oldServerName = ""; + bool noSim = false; if (Directory.Exists(testFolder)) { @@ -254,9 +255,10 @@ namespace SummarizeTest if( Directory.Exists(Path.Combine(testFolder, "slow")) ) poolSize += 5; if( Directory.Exists(Path.Combine(testFolder, "fast")) ) poolSize += 14; if( Directory.Exists(Path.Combine(testFolder, "restarting")) ) poolSize += 1; + if( Directory.Exists(Path.Combine(testFolder, "noSim")) ) poolSize += 1; if( poolSize == 0 ) { - Console.WriteLine("Passed folder ({0}) did not have a fast, slow, rare, or restarting sub-folder", testFolder); + Console.WriteLine("Passed folder ({0}) did not have a fast, slow, rare, restarting, or noSim sub-folder", testFolder); return 1; } int selection = random.Next(poolSize); @@ -272,11 +274,20 @@ namespace SummarizeTest testDir = Path.Combine(testFolder, "restarting"); else { - if (Directory.Exists(Path.Combine(testFolder, "slow"))) selectionWindow += 5; + if (Directory.Exists(Path.Combine(testFolder, "noSim"))) selectionWindow += 1; if (selection < selectionWindow) - testDir = Path.Combine(testFolder, "slow"); + { + testDir = Path.Combine(testFolder, "noSim"); + noSim = true; + } else - testDir = Path.Combine(testFolder, "fast"); + { + if (Directory.Exists(Path.Combine(testFolder, "slow"))) selectionWindow += 5; + if (selection < selectionWindow) + testDir = Path.Combine(testFolder, "slow"); + else + testDir = Path.Combine(testFolder, "fast"); + } } } string[] files = Directory.GetFiles(testDir, "*", SearchOption.AllDirectories); @@ -341,11 +352,11 @@ namespace SummarizeTest bool useNewPlugin = (oldServerName == fdbserverName) || versionGreaterThanOrEqual(oldServerName.Split('-').Last(), "5.2.0"); bool useToml = File.Exists(testFile + "-1.toml"); string testFile1 = useToml ? testFile + "-1.toml" : testFile + "-1.txt"; - result = RunTest(firstServerName, useNewPlugin ? tlsPluginFile : tlsPluginFile_5_1, summaryFileName, errorFileName, seed, buggify, testFile1, runDir, uid, expectedUnseed, out unseed, out retryableError, logOnRetryableError, useValgrind, false, true, oldServerName, traceToStdout); + result = RunTest(firstServerName, useNewPlugin ? tlsPluginFile : tlsPluginFile_5_1, summaryFileName, errorFileName, seed, buggify, testFile1, runDir, uid, expectedUnseed, out unseed, out retryableError, logOnRetryableError, useValgrind, false, true, oldServerName, traceToStdout, noSim); if (result == 0) { string testFile2 = useToml ? testFile + "-2.toml" : testFile + "-2.txt"; - result = RunTest(secondServerName, tlsPluginFile, summaryFileName, errorFileName, seed+1, buggify, testFile2, runDir, uid, expectedUnseed, out unseed, out retryableError, logOnRetryableError, useValgrind, true, false, oldServerName, traceToStdout); + result = RunTest(secondServerName, tlsPluginFile, summaryFileName, errorFileName, seed+1, buggify, testFile2, runDir, uid, expectedUnseed, out unseed, out retryableError, logOnRetryableError, useValgrind, true, false, oldServerName, traceToStdout, noSim); } } else @@ -353,13 +364,13 @@ namespace SummarizeTest int expectedUnseed = -1; if (!useValgrind && unseedCheck) { - result = RunTest(fdbserverName, tlsPluginFile, null, null, seed, buggify, testFile, runDir, Guid.NewGuid().ToString(), -1, out expectedUnseed, out retryableError, logOnRetryableError, false, false, false, "", traceToStdout); + result = RunTest(fdbserverName, tlsPluginFile, null, null, seed, buggify, testFile, runDir, Guid.NewGuid().ToString(), -1, out expectedUnseed, out retryableError, logOnRetryableError, false, false, false, "", traceToStdout, noSim); } if (!retryableError) { int unseed; - result = RunTest(fdbserverName, tlsPluginFile, summaryFileName, errorFileName, seed, buggify, testFile, runDir, Guid.NewGuid().ToString(), expectedUnseed, out unseed, out retryableError, logOnRetryableError, useValgrind, false, false, "", traceToStdout); + result = RunTest(fdbserverName, tlsPluginFile, summaryFileName, errorFileName, seed, buggify, testFile, runDir, Guid.NewGuid().ToString(), expectedUnseed, out unseed, out retryableError, logOnRetryableError, useValgrind, false, false, "", traceToStdout, noSim); } } @@ -374,7 +385,7 @@ namespace SummarizeTest private static int RunTest(string fdbserverName, string tlsPluginFile, string summaryFileName, string errorFileName, int seed, bool buggify, string testFile, string runDir, string uid, int expectedUnseed, out int unseed, out bool retryableError, bool logOnRetryableError, bool useValgrind, bool restarting = false, - bool willRestart = false, string oldBinaryName = "", bool traceToStdout = false) + bool willRestart = false, string oldBinaryName = "", bool traceToStdout = false, bool noSim = false) { unseed = -1; @@ -408,16 +419,17 @@ namespace SummarizeTest tlsPluginArg = "--tls_plugin=" + tlsPluginFile; } process.StartInfo.RedirectStandardOutput = true; + string role = (noSim) ? "test" : "simulation"; var args = ""; if (willRestart && oldBinaryName.EndsWith("alpha6")) { - args = string.Format("-Rs 1000000000 -r simulation {0} -s {1} -f \"{2}\" -b {3} {4} --crash", - IsRunningOnMono() ? "" : "-q", seed, testFile, buggify ? "on" : "off", tlsPluginArg); + args = string.Format("-Rs 1000000000 -r {0} {1} -s {2} -f \"{3}\" -b {4} {5} --crash", + role, IsRunningOnMono() ? "" : "-q", seed, testFile, buggify ? "on" : "off", tlsPluginArg); } else { - args = string.Format("-Rs 1GB -r simulation {0} -s {1} -f \"{2}\" -b {3} {4} --crash", - IsRunningOnMono() ? "" : "-q", seed, testFile, buggify ? "on" : "off", tlsPluginArg); + args = string.Format("-Rs 1GB -r {0} {1} -s {2} -f \"{3}\" -b {4} {5} --crash", + role, IsRunningOnMono() ? "" : "-q", seed, testFile, buggify ? "on" : "off", tlsPluginArg); } if (restarting) args = args + " --restarting"; if (useValgrind && !willRestart) diff --git a/fdbserver/KeyValueStoreRocksDB.actor.cpp b/fdbserver/KeyValueStoreRocksDB.actor.cpp index 7377a6d5cf..2f2c77c42e 100644 --- a/fdbserver/KeyValueStoreRocksDB.actor.cpp +++ b/fdbserver/KeyValueStoreRocksDB.actor.cpp @@ -488,7 +488,7 @@ IKeyValueStore* keyValueStoreRocksDB(std::string const& path, namespace { -TEST_CASE("fdbserver/KeyValueStoreRocksDB/Reopen") { +TEST_CASE("noSim/fdbserver/KeyValueStoreRocksDB/Reopen") { state const std::string rocksDBTestDir = "rocksdb-kvstore-reopen-test-db"; platform::eraseDirectoryRecursive(rocksDBTestDir); diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f84abc0faf..d1b08d9ffd 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -155,6 +155,7 @@ if(WITH_PYTHON) add_fdb_test(TEST_FILES fast/Watches.toml) add_fdb_test(TEST_FILES fast/WriteDuringRead.toml) add_fdb_test(TEST_FILES fast/WriteDuringReadClean.toml) + add_fdb_test(TEST_FILES noSim/RandomUnitTests.toml) add_fdb_test(TEST_FILES rare/CheckRelocation.toml) add_fdb_test(TEST_FILES rare/ClogUnclog.toml) add_fdb_test(TEST_FILES rare/CloggedCycleWithKills.toml) From ef2a2cd1a564ec61827644bd3da842afec080711 Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Mon, 14 Jun 2021 13:11:43 -0400 Subject: [PATCH 08/10] Actually add test file --- tests/noSim/RandomUnitTests.toml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/noSim/RandomUnitTests.toml diff --git a/tests/noSim/RandomUnitTests.toml b/tests/noSim/RandomUnitTests.toml new file mode 100644 index 0000000000..769ea7596f --- /dev/null +++ b/tests/noSim/RandomUnitTests.toml @@ -0,0 +1,9 @@ +[[test]] +testTitle = 'UnitTests' +useDB = false +startDelay = 0 + + [[test.workload]] + testName = 'UnitTests' + maxTestCases = 1 + testsMatching = 'noSim/' From 16a53fe531f6875f97cde6c6e8a0cf1994e2c727 Mon Sep 17 00:00:00 2001 From: Jingyu Zhou Date: Mon, 14 Jun 2021 13:43:31 -0700 Subject: [PATCH 09/10] Update fdbserver/workloads/HealthMetricsApi.actor.cpp Co-authored-by: A.J. Beamon --- fdbserver/workloads/HealthMetricsApi.actor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fdbserver/workloads/HealthMetricsApi.actor.cpp b/fdbserver/workloads/HealthMetricsApi.actor.cpp index ec22baa1a2..fff9c1ae91 100644 --- a/fdbserver/workloads/HealthMetricsApi.actor.cpp +++ b/fdbserver/workloads/HealthMetricsApi.actor.cpp @@ -168,7 +168,7 @@ struct HealthMetricsApiWorkload : TestWorkload { traceDiskUsage.detail(format("Storage-%s", ss.first.toString().c_str()), storageStats.diskUsage); } TraceEvent traceTLogQueue("TLogQueue"); - traceTLogQueue.setMaxFieldLength(10000).setMaxEventLength(11000); + traceTLogQueue.setMaxEventLength(10000); for (const auto& ss : healthMetrics.tLogQueue) { self->detailedWorstTLogQueue = std::max(self->detailedWorstTLogQueue, ss.second); traceTLogQueue.detail(format("TLog-%s", ss.first.toString().c_str()), ss.second); From 549cf0512b61fc78207c13ff49cb29d50e18027e Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Mon, 14 Jun 2021 19:23:56 -0400 Subject: [PATCH 10/10] Revert "Add support for running non-simulation tests on Joshua" --- contrib/TestHarness/Program.cs.cmake | 38 ++++++++---------------- fdbserver/KeyValueStoreRocksDB.actor.cpp | 2 +- tests/CMakeLists.txt | 1 - tests/noSim/RandomUnitTests.toml | 9 ------ 4 files changed, 14 insertions(+), 36 deletions(-) delete mode 100644 tests/noSim/RandomUnitTests.toml diff --git a/contrib/TestHarness/Program.cs.cmake b/contrib/TestHarness/Program.cs.cmake index ab5d557dfd..c9edc4f29b 100644 --- a/contrib/TestHarness/Program.cs.cmake +++ b/contrib/TestHarness/Program.cs.cmake @@ -247,7 +247,6 @@ namespace SummarizeTest string testFile = null; string testDir = ""; string oldServerName = ""; - bool noSim = false; if (Directory.Exists(testFolder)) { @@ -256,10 +255,9 @@ namespace SummarizeTest if( Directory.Exists(Path.Combine(testFolder, "slow")) ) poolSize += 5; if( Directory.Exists(Path.Combine(testFolder, "fast")) ) poolSize += 14; if( Directory.Exists(Path.Combine(testFolder, "restarting")) ) poolSize += 1; - if( Directory.Exists(Path.Combine(testFolder, "noSim")) ) poolSize += 1; if( poolSize == 0 ) { - Console.WriteLine("Passed folder ({0}) did not have a fast, slow, rare, restarting, or noSim sub-folder", testFolder); + Console.WriteLine("Passed folder ({0}) did not have a fast, slow, rare, or restarting sub-folder", testFolder); return 1; } int selection = random.Next(poolSize); @@ -275,20 +273,11 @@ namespace SummarizeTest testDir = Path.Combine(testFolder, "restarting"); else { - if (Directory.Exists(Path.Combine(testFolder, "noSim"))) selectionWindow += 1; + if (Directory.Exists(Path.Combine(testFolder, "slow"))) selectionWindow += 5; if (selection < selectionWindow) - { - testDir = Path.Combine(testFolder, "noSim"); - noSim = true; - } + testDir = Path.Combine(testFolder, "slow"); else - { - if (Directory.Exists(Path.Combine(testFolder, "slow"))) selectionWindow += 5; - if (selection < selectionWindow) - testDir = Path.Combine(testFolder, "slow"); - else - testDir = Path.Combine(testFolder, "fast"); - } + testDir = Path.Combine(testFolder, "fast"); } } string[] files = Directory.GetFiles(testDir, "*", SearchOption.AllDirectories); @@ -353,11 +342,11 @@ namespace SummarizeTest bool useNewPlugin = (oldServerName == fdbserverName) || versionGreaterThanOrEqual(oldServerName.Split('-').Last(), "5.2.0"); bool useToml = File.Exists(testFile + "-1.toml"); string testFile1 = useToml ? testFile + "-1.toml" : testFile + "-1.txt"; - result = RunTest(firstServerName, useNewPlugin ? tlsPluginFile : tlsPluginFile_5_1, summaryFileName, errorFileName, seed, buggify, testFile1, runDir, uid, expectedUnseed, out unseed, out retryableError, logOnRetryableError, useValgrind, false, true, oldServerName, traceToStdout, noSim); + result = RunTest(firstServerName, useNewPlugin ? tlsPluginFile : tlsPluginFile_5_1, summaryFileName, errorFileName, seed, buggify, testFile1, runDir, uid, expectedUnseed, out unseed, out retryableError, logOnRetryableError, useValgrind, false, true, oldServerName, traceToStdout); if (result == 0) { string testFile2 = useToml ? testFile + "-2.toml" : testFile + "-2.txt"; - result = RunTest(secondServerName, tlsPluginFile, summaryFileName, errorFileName, seed+1, buggify, testFile2, runDir, uid, expectedUnseed, out unseed, out retryableError, logOnRetryableError, useValgrind, true, false, oldServerName, traceToStdout, noSim); + result = RunTest(secondServerName, tlsPluginFile, summaryFileName, errorFileName, seed+1, buggify, testFile2, runDir, uid, expectedUnseed, out unseed, out retryableError, logOnRetryableError, useValgrind, true, false, oldServerName, traceToStdout); } } else @@ -365,13 +354,13 @@ namespace SummarizeTest int expectedUnseed = -1; if (!useValgrind && unseedCheck) { - result = RunTest(fdbserverName, tlsPluginFile, null, null, seed, buggify, testFile, runDir, Guid.NewGuid().ToString(), -1, out expectedUnseed, out retryableError, logOnRetryableError, false, false, false, "", traceToStdout, noSim); + result = RunTest(fdbserverName, tlsPluginFile, null, null, seed, buggify, testFile, runDir, Guid.NewGuid().ToString(), -1, out expectedUnseed, out retryableError, logOnRetryableError, false, false, false, "", traceToStdout); } if (!retryableError) { int unseed; - result = RunTest(fdbserverName, tlsPluginFile, summaryFileName, errorFileName, seed, buggify, testFile, runDir, Guid.NewGuid().ToString(), expectedUnseed, out unseed, out retryableError, logOnRetryableError, useValgrind, false, false, "", traceToStdout, noSim); + result = RunTest(fdbserverName, tlsPluginFile, summaryFileName, errorFileName, seed, buggify, testFile, runDir, Guid.NewGuid().ToString(), expectedUnseed, out unseed, out retryableError, logOnRetryableError, useValgrind, false, false, "", traceToStdout); } } @@ -386,7 +375,7 @@ namespace SummarizeTest private static int RunTest(string fdbserverName, string tlsPluginFile, string summaryFileName, string errorFileName, int seed, bool buggify, string testFile, string runDir, string uid, int expectedUnseed, out int unseed, out bool retryableError, bool logOnRetryableError, bool useValgrind, bool restarting = false, - bool willRestart = false, string oldBinaryName = "", bool traceToStdout = false, bool noSim = false) + bool willRestart = false, string oldBinaryName = "", bool traceToStdout = false) { unseed = -1; @@ -420,17 +409,16 @@ namespace SummarizeTest tlsPluginArg = "--tls_plugin=" + tlsPluginFile; } process.StartInfo.RedirectStandardOutput = true; - string role = (noSim) ? "test" : "simulation"; var args = ""; if (willRestart && oldBinaryName.EndsWith("alpha6")) { - args = string.Format("-Rs 1000000000 -r {0} {1} -s {2} -f \"{3}\" -b {4} {5} --crash", - role, IsRunningOnMono() ? "" : "-q", seed, testFile, buggify ? "on" : "off", tlsPluginArg); + args = string.Format("-Rs 1000000000 -r simulation {0} -s {1} -f \"{2}\" -b {3} {4} --crash", + IsRunningOnMono() ? "" : "-q", seed, testFile, buggify ? "on" : "off", tlsPluginArg); } else { - args = string.Format("-Rs 1GB -r {0} {1} -s {2} -f \"{3}\" -b {4} {5} --crash", - role, IsRunningOnMono() ? "" : "-q", seed, testFile, buggify ? "on" : "off", tlsPluginArg); + args = string.Format("-Rs 1GB -r simulation {0} -s {1} -f \"{2}\" -b {3} {4} --crash", + IsRunningOnMono() ? "" : "-q", seed, testFile, buggify ? "on" : "off", tlsPluginArg); } if (restarting) args = args + " --restarting"; if (useValgrind && !willRestart) diff --git a/fdbserver/KeyValueStoreRocksDB.actor.cpp b/fdbserver/KeyValueStoreRocksDB.actor.cpp index 2f2c77c42e..7377a6d5cf 100644 --- a/fdbserver/KeyValueStoreRocksDB.actor.cpp +++ b/fdbserver/KeyValueStoreRocksDB.actor.cpp @@ -488,7 +488,7 @@ IKeyValueStore* keyValueStoreRocksDB(std::string const& path, namespace { -TEST_CASE("noSim/fdbserver/KeyValueStoreRocksDB/Reopen") { +TEST_CASE("fdbserver/KeyValueStoreRocksDB/Reopen") { state const std::string rocksDBTestDir = "rocksdb-kvstore-reopen-test-db"; platform::eraseDirectoryRecursive(rocksDBTestDir); diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d1b08d9ffd..f84abc0faf 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -155,7 +155,6 @@ if(WITH_PYTHON) add_fdb_test(TEST_FILES fast/Watches.toml) add_fdb_test(TEST_FILES fast/WriteDuringRead.toml) add_fdb_test(TEST_FILES fast/WriteDuringReadClean.toml) - add_fdb_test(TEST_FILES noSim/RandomUnitTests.toml) add_fdb_test(TEST_FILES rare/CheckRelocation.toml) add_fdb_test(TEST_FILES rare/ClogUnclog.toml) add_fdb_test(TEST_FILES rare/CloggedCycleWithKills.toml) diff --git a/tests/noSim/RandomUnitTests.toml b/tests/noSim/RandomUnitTests.toml deleted file mode 100644 index 769ea7596f..0000000000 --- a/tests/noSim/RandomUnitTests.toml +++ /dev/null @@ -1,9 +0,0 @@ -[[test]] -testTitle = 'UnitTests' -useDB = false -startDelay = 0 - - [[test.workload]] - testName = 'UnitTests' - maxTestCases = 1 - testsMatching = 'noSim/'