From 444a5a0ec8ff611eb5d9c7db3f0b2779a8af977f Mon Sep 17 00:00:00 2001 From: Jingyu Zhou Date: Thu, 4 Jun 2020 11:18:42 -0700 Subject: [PATCH 1/2] Set up blob credentials for backup workers This is needed so that backup workers (fdbserver) can upload files to blobs. --- fdbserver/fdbserver.actor.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/fdbserver/fdbserver.actor.cpp b/fdbserver/fdbserver.actor.cpp index 3c1ec52643..576e811c50 100644 --- a/fdbserver/fdbserver.actor.cpp +++ b/fdbserver/fdbserver.actor.cpp @@ -941,7 +941,7 @@ struct CLIOptions { double fileIoTimeout = 0.0; bool fileIoWarnOnly = false; uint64_t rsssize = -1; - std::vector blobCredentials; // used for fast restore workers + std::vector blobCredentials; // used for fast restore workers & backup workers const char* blobCredsFromENV = nullptr; Reference connectionFile; @@ -1846,6 +1846,16 @@ int main(int argc, char* argv[]) { setupAndRun(dataFolder, opts.testFile, opts.restarting, (isRestoring >= 1), opts.whitelistBinPaths); g_simulator.run(); } else if (role == FDBD) { + // Update the global blob credential files list so that both fast + // restore workers and backup workers can access blob storage. + std::vector* pFiles = + (std::vector*)g_network->global(INetwork::enBlobCredentialFiles); + if (pFiles != nullptr) { + for (auto& f : opts.blobCredentials) { + pFiles->push_back(f); + } + } + // Call fast restore for the class FastRestoreClass. This is a short-cut to run fast restore in circus if (opts.processClass == ProcessClass::FastRestoreClass) { printf("Run as fast restore worker\n"); @@ -1854,15 +1864,6 @@ int main(int argc, char* argv[]) { if (!dataFolder.size()) dataFolder = format("fdb/%d/", opts.publicAddresses.address.port); // SOMEDAY: Better default - // Update the global blob credential files list - std::vector* pFiles = - (std::vector*)g_network->global(INetwork::enBlobCredentialFiles); - if (pFiles != nullptr) { - for (auto& f : opts.blobCredentials) { - pFiles->push_back(f); - } - } - vector> actors(listenErrors.begin(), listenErrors.end()); actors.push_back(restoreWorker(opts.connectionFile, opts.localities, dataFolder)); f = stopAfter(waitForAll(actors)); From dc7059185950cd96a6d88da6edad45f8efb4483c Mon Sep 17 00:00:00 2001 From: Jingyu Zhou Date: Thu, 11 Jun 2020 11:52:54 -0700 Subject: [PATCH 2/2] Fix fdbbackup help message --- fdbbackup/backup.actor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fdbbackup/backup.actor.cpp b/fdbbackup/backup.actor.cpp index 3b5518730d..0076ca9e05 100644 --- a/fdbbackup/backup.actor.cpp +++ b/fdbbackup/backup.actor.cpp @@ -955,7 +955,7 @@ static void printBackupUsage(bool devhelp) { printf(" -e ERRORLIMIT The maximum number of errors printed by status (default is 10).\n"); printf(" -k KEYS List of key ranges to backup.\n" " If not specified, the entire database will be backed up.\n"); - printf(" -p, --partitioned_log Starts with new type of backup system using partitioned logs.\n"); + printf(" --partitioned_log_experimental Starts with new type of backup system using partitioned logs.\n"); printf(" -n, --dryrun For backup start or restore start, performs a trial run with no actual changes made.\n"); printf(" --log Enables trace file logging for the CLI session.\n" " --logdir PATH Specifes the output directory for trace files. If\n"