Make FASTRESTORE_ATOMICOP_WEIGHT a client knob

This commit is contained in:
sfc-gh-tclinkenbeard 2021-05-30 08:28:26 -07:00
parent f4edd60e29
commit c015d33e47
4 changed files with 5 additions and 2 deletions

View File

@ -23,7 +23,7 @@
#pragma once
#include "fdbclient/FDBTypes.h"
#include "fdbserver/Knobs.h"
#include "fdbclient/Knobs.h"
// The versioned message has wire format : -1, version, messages
static const int32_t VERSION_HEADER = -1;
@ -95,7 +95,7 @@ struct MutationRef {
// Amplify atomicOp size to consider such extra workload.
// A good value for FASTRESTORE_ATOMICOP_WEIGHT needs experimental evaluations.
if (isAtomicOp()) {
return totalSize() * SERVER_KNOBS->FASTRESTORE_ATOMICOP_WEIGHT;
return totalSize() * CLIENT_KNOBS->FASTRESTORE_ATOMICOP_WEIGHT;
} else {
return totalSize();
}

View File

@ -173,6 +173,7 @@ void ClientKnobs::initialize(bool randomize) {
init( BACKUP_STATUS_JITTER, 0.05 );
init( MIN_CLEANUP_SECONDS, 3600.0 );
init( RESTORE_IGNORE_LOG_FILES, false );
init( FASTRESTORE_ATOMICOP_WEIGHT, 1 ); if( randomize && BUGGIFY ) { FASTRESTORE_ATOMICOP_WEIGHT = deterministicRandom()->random01() * 200 + 1; }
// Configuration
init( DEFAULT_AUTO_COMMIT_PROXIES, 3 );

View File

@ -168,6 +168,7 @@ public:
double BACKUP_STATUS_JITTER;
double MIN_CLEANUP_SECONDS;
bool RESTORE_IGNORE_LOG_FILES; // Default is false. When set to true, the log files will be ignored during the restore, which can produce inconsistent restored data.
int64_t FASTRESTORE_ATOMICOP_WEIGHT; // workload amplication factor for atomic op
// Configuration
int32_t DEFAULT_AUTO_COMMIT_PROXIES;

View File

@ -21,6 +21,7 @@
#include "fdbrpc/FailureMonitor.h"
#include "fdbrpc/Locality.h"
#include "fdbserver/CoordinationInterface.h"
#include "fdbserver/Knobs.h"
#include "fdbclient/MonitorLeader.h"
#include "flow/actorcompiler.h" // This must be the last #include.