Minor changes.
This commit is contained in:
parent
a7721d9786
commit
8d1e97b329
|
@ -85,7 +85,8 @@ public:
|
|||
if (enabled && res) {
|
||||
auto bitFlipPercentage = static_cast<BitFlipper*>(res)->getBitFlipPercentage();
|
||||
if (bitFlipPercentage > 0.0) {
|
||||
if (deterministicRandom()->random01() < bitFlipPercentage) {
|
||||
auto bitFlipProb = bitFlipPercentage/100;
|
||||
if (deterministicRandom()->random01() < bitFlipProb) {
|
||||
pdata = (char*)arena.allocate4kAlignedBuffer(length);
|
||||
memcpy(pdata, data, length);
|
||||
// flip a random bit in the copied buffer
|
||||
|
|
|
@ -47,9 +47,18 @@ struct ClearSingleRange : TestWorkload {
|
|||
|
||||
ACTOR static Future<Void> fdbClientClearRange(Database db, ClearSingleRange* self) {
|
||||
state Transaction tr(db);
|
||||
TraceEvent("ClearSingleRangeWaiting").detail("StartDelay", self->startDelay);
|
||||
wait(delay(self->startDelay));
|
||||
tr.clear(KeyRangeRef(self->begin, self->end));
|
||||
try {
|
||||
TraceEvent("ClearSingleRange").
|
||||
detail("Begin", printable(self->begin)).
|
||||
detail("End", printable(self->end)).detail("StartDelay", self->startDelay);
|
||||
tr.setOption(FDBTransactionOptions::NEXT_WRITE_NO_WRITE_CONFLICT_RANGE);
|
||||
wait(delay(self->startDelay));
|
||||
tr.clear(KeyRangeRef(self->begin, self->end));
|
||||
wait(tr.commit());
|
||||
} catch (Error& e) {
|
||||
TraceEvent("ClearRangeError").error(e);
|
||||
wait(tr.onError(e));
|
||||
}
|
||||
return Void();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -225,7 +225,7 @@ struct DiskFailureInjectionWorkload : TestWorkload {
|
|||
if (self->throttleDisk) {
|
||||
int diskDelays = chaosMetrics->second.getInt("DiskDelays");
|
||||
if (diskDelays > 0) {
|
||||
foundChaosMetrics++;
|
||||
foundChaosMetrics += diskDelays;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -233,7 +233,7 @@ struct DiskFailureInjectionWorkload : TestWorkload {
|
|||
if (self->corruptFile) {
|
||||
int bitFlips = chaosMetrics->second.getInt("BitFlips");
|
||||
if (bitFlips > 0) {
|
||||
foundChaosMetrics++;
|
||||
foundChaosMetrics += bitFlips;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ struct MakoWorkload : TestWorkload {
|
|||
commits("Commits"), totalOps("Operations") {
|
||||
// init parameters from test file
|
||||
// Number of rows populated
|
||||
rowCount = getOption(options, LiteralStringRef("rows"), 10000);
|
||||
rowCount = getOption(options, LiteralStringRef("rows"), (uint64_t )10000);
|
||||
// Test duration in seconds
|
||||
testDuration = getOption(options, LiteralStringRef("testDuration"), 30.0);
|
||||
warmingDelay = getOption(options, LiteralStringRef("warmingDelay"), 0.0);
|
||||
|
|
|
@ -78,6 +78,7 @@ struct TargetedKillWorkload : TestWorkload {
|
|||
workers[i].processClass != ProcessClass::TesterClass)) {
|
||||
TraceEvent("WorkerKill").detail("TargetedMachine", address).detail("Worker", workers[i].interf.id());
|
||||
workers[i].interf.clientInterface.reboot.send(rbReq);
|
||||
killed++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue