Merge pull request #4653 from sfc-gh-satherton/correctness-fix
Correctness fix: Prevent writes from being too slow in simulation
This commit is contained in:
commit
a43897c74c
|
@ -197,7 +197,7 @@ private:
|
|||
this->file = file;
|
||||
this->filename = filename;
|
||||
this->diskParameters = diskParameters;
|
||||
maxWriteDelay = 5.0;
|
||||
maxWriteDelay = FLOW_KNOBS->NON_DURABLE_MAX_WRITE_DELAY;
|
||||
hasBeenSynced = false;
|
||||
|
||||
killMode = (KillMode)deterministicRandom()->randomInt(1, 3);
|
||||
|
@ -434,7 +434,8 @@ private:
|
|||
state TaskPriority currentTaskID = g_network->getCurrentTask();
|
||||
wait(g_simulator.onMachine(currentProcess));
|
||||
|
||||
state double delayDuration = deterministicRandom()->random01() * self->maxWriteDelay;
|
||||
state double delayDuration =
|
||||
g_simulator.speedUpSimulation ? 0.0001 : (deterministicRandom()->random01() * self->maxWriteDelay);
|
||||
state Standalone<StringRef> dataCopy(StringRef((uint8_t*)data, length));
|
||||
|
||||
state Future<bool> startSyncFuture = self->startSyncPromise.getFuture();
|
||||
|
@ -606,7 +607,8 @@ private:
|
|||
state TaskPriority currentTaskID = g_network->getCurrentTask();
|
||||
wait(g_simulator.onMachine(currentProcess));
|
||||
|
||||
state double delayDuration = deterministicRandom()->random01() * self->maxWriteDelay;
|
||||
state double delayDuration =
|
||||
g_simulator.speedUpSimulation ? 0.0001 : (deterministicRandom()->random01() * self->maxWriteDelay);
|
||||
state Future<bool> startSyncFuture = self->startSyncPromise.getFuture();
|
||||
|
||||
try {
|
||||
|
|
|
@ -135,6 +135,7 @@ void FlowKnobs::initialize(bool randomize, bool isSimulated) {
|
|||
init( DISABLE_POSIX_KERNEL_AIO, 0 );
|
||||
|
||||
//AsyncFileNonDurable
|
||||
init( NON_DURABLE_MAX_WRITE_DELAY, 5.0 );
|
||||
init( MAX_PRIOR_MODIFICATION_DELAY, 1.0 ); if( randomize && BUGGIFY ) MAX_PRIOR_MODIFICATION_DELAY = 10.0;
|
||||
|
||||
//GenericActors
|
||||
|
|
|
@ -149,6 +149,7 @@ public:
|
|||
int DISABLE_POSIX_KERNEL_AIO;
|
||||
|
||||
// AsyncFileNonDurable
|
||||
double NON_DURABLE_MAX_WRITE_DELAY;
|
||||
double MAX_PRIOR_MODIFICATION_DELAY;
|
||||
|
||||
// GenericActors
|
||||
|
|
Loading…
Reference in New Issue