Merge remote-tracking branch 'origin/master' into const-serverdbinfo

This commit is contained in:
sfc-gh-tclinkenbeard 2021-07-21 11:02:47 -07:00
commit 169df42a8b
10 changed files with 393 additions and 218 deletions

0
contrib/gen_compile_db.py Executable file → Normal file
View File

View File

@ -19,9 +19,7 @@
*/
#include "fdbclient/BackupContainerAzureBlobStore.h"
#if (!defined(TLS_DISABLED) && !defined(_WIN32))
#include "fdbrpc/AsyncFileEncrypted.h"
#emdif
#include "flow/actorcompiler.h" // This must be the last #include.
@ -250,9 +248,7 @@ BackupContainerAzureBlobStore::BackupContainerAzureBlobStore(const NetworkAddres
const std::string& containerName,
const Optional<std::string>& encryptionKeyFileName)
: containerName(containerName) {
#if (!defined(TLS_DISABLED) && !defined(_WIN32))
setEncryptionKey(encryptionKeyFileName);
#endif
std::string accountKey = std::getenv("AZURE_KEY");
auto credential = std::make_shared<azure::storage_lite::shared_key_credential>(accountName, accountKey);
auto storageAccount = std::make_shared<azure::storage_lite::storage_account>(

View File

@ -23,9 +23,7 @@
#include "fdbclient/BackupContainerFileSystem.h"
#include "fdbclient/BackupContainerLocalDirectory.h"
#include "fdbclient/JsonBuilder.h"
#if (!defined(TLS_DISABLED) && !defined(_WIN32))
#include "flow/StreamCipher.h"
#endif
#include "flow/UnitTest.h"
#include <algorithm>
@ -1481,7 +1479,6 @@ Future<Void> BackupContainerFileSystem::encryptionSetupComplete() const {
return encryptionSetupFuture;
}
#if (!defined(TLS_DISABLED) && !defined(_WIN32))
void BackupContainerFileSystem::setEncryptionKey(Optional<std::string> const& encryptionKeyFileName) {
if (encryptionKeyFileName.present()) {
#if ENCRYPTION_ENABLED
@ -1498,11 +1495,6 @@ Future<Void> BackupContainerFileSystem::createTestEncryptionKeyFile(std::string
return Void();
#endif
}
#else
Future<Void> BackupContainerFileSystem::createTestEncryptionKeyFile(std::string const& filename) {
return Void();
}
#endif
namespace backup_test {

View File

@ -156,9 +156,7 @@ public:
protected:
bool usesEncryption() const;
#if (!defined(TLS_DISABLED) && !defined(_WIN32))
void setEncryptionKey(Optional<std::string> const& encryptionKeyFileName);
#endif
Future<Void> encryptionSetupComplete() const;
private:

View File

@ -133,9 +133,7 @@ std::string BackupContainerLocalDirectory::getURLFormat() {
BackupContainerLocalDirectory::BackupContainerLocalDirectory(const std::string& url,
const Optional<std::string>& encryptionKeyFileName) {
#if (!defined(TLS_DISABLED) && !defined(_WIN32))
setEncryptionKey(encryptionKeyFileName);
#endif
std::string path;
if (url.find("file://") != 0) {

View File

@ -147,9 +147,7 @@ BackupContainerS3BlobStore::BackupContainerS3BlobStore(Reference<S3BlobStoreEndp
const S3BlobStoreEndpoint::ParametersT& params,
const Optional<std::string>& encryptionKeyFileName)
: m_bstore(bstore), m_name(name), m_bucket("FDB_BACKUPS_V2") {
#if (!defined(TLS_DISABLED) && !defined(_WIN32))
setEncryptionKey(encryptionKeyFileName);
#endif
// Currently only one parameter is supported, "bucket"
for (const auto& [name, value] : params) {
if (name == "bucket") {

View File

@ -42,10 +42,10 @@ typedef uint32_t QueueID;
// Pager Events
enum class PagerEvents { CacheLookup = 0, CacheHit, CacheMiss, PageWrite, MAXEVENTS };
static const std::string PagerEventsCodes[] = { "Lookup", "Hit", "Miss", "Write" };
static const std::string PagerEventsStrings[] = { "Lookup", "Hit", "Miss", "Write", "Unknown" };
// Reasons for page level events.
enum class PagerEventReasons { PointRead = 0, RangeRead, RangePrefetch, Commit, LazyClear, MetaData, MAXEVENTREASONS };
static const std::string PagerEventReasonsCodes[] = { "Get", "GetR", "GetRPF", "Commit", "LazyClr", "Meta" };
static const std::string PagerEventReasonsStrings[] = { "Get", "GetR", "GetRPF", "Commit", "LazyClr", "Meta", "Unknown" };
static const int nonBtreeLevel = 0;
static const std::pair<PagerEvents, PagerEventReasons> possibleEventReasonPairs[] = {
@ -167,6 +167,7 @@ public:
virtual Future<Reference<const ArenaPage>> getPhysicalPage(PagerEventReasons reason,
unsigned int level,
LogicalPageID pageID,
int priority,
bool cacheable,
bool nohit) = 0;
virtual bool tryEvictPage(LogicalPageID id) = 0;
@ -238,8 +239,9 @@ public:
virtual Future<Reference<ArenaPage>> readPage(PagerEventReasons reason,
unsigned int level,
LogicalPageID pageID,
bool cacheable = true,
bool noHit = false) = 0;
int priority,
bool cacheable,
bool noHit) = 0;
virtual Future<Reference<ArenaPage>> readExtent(LogicalPageID pageID) = 0;
virtual void releaseExtentReadLock() = 0;

File diff suppressed because it is too large Load Diff

View File

@ -55,7 +55,7 @@ struct UnitTestWorkload : TestWorkload {
if (g_network->isSimulated()) {
testParams.setDataDir(getOption(options, "dataDir"_sr, "simfdb/unittests/"_sr).toString());
} else {
testParams.setDataDir(getOption(options, "dataDir"_sr, "/private/tmp/"_sr).toString());
testParams.setDataDir(getOption(options, "dataDir"_sr, "unittests/"_sr).toString());
}
cleanupAfterTests = getOption(options, "cleanupAfterTests"_sr, true);

0
tests/TestRunner/tmp_multi_cluster.py Executable file → Normal file
View File