add comment

This commit is contained in:
Xiaoxi Wang 2022-10-11 09:27:05 -07:00
parent b76268544f
commit f16ba3991f
1 changed files with 8 additions and 4 deletions

View File

@ -71,7 +71,11 @@ struct IDDTxnProcessorApiWorkload : TestWorkload {
std::string description() const override { return desc; }
Future<Void> setup(Database const& cx) override { return enabled ? _setup(cx, this) : Void(); }
Future<Void> start(Database const& cx) override { return enabled ? _start(cx, this) : Void(); }
void disableFailureInjectionWorkloads(std::set<std::string>& out) const override { out.insert("all"); }
// This workload is not compatible with RandomMoveKeys workload because they will race in changing the DD mode.
// Other workload injections may make no sense because this workload only use the DB at beginning to reading the
// real world key-server mappings. It's not harmful to leave other workload injection enabled for now, though.
void disableFailureInjectionWorkloads(std::set<std::string>& out) const override { out.insert("RandomMoveKeys"); }
ACTOR Future<Void> _setup(Database cx, IDDTxnProcessorApiWorkload* self) {
self->real = std::make_shared<DDTxnProcessor>(cx);
@ -101,8 +105,8 @@ struct IDDTxnProcessorApiWorkload : TestWorkload {
}
ACTOR Future<Void> _start(Database cx, IDDTxnProcessorApiWorkload* self) {
state int oldMode = wait(setDDMode(cx, 0));
TraceEvent("IDDTxnApiTestStartModeSetting").log();
int oldMode = wait(setDDMode(cx, 0));
TraceEvent("IDDTxnApiTestStartModeSetting").detail("OldValue", oldMode).log();
self->mgs = std::make_shared<MockGlobalState>();
self->mgs->configuration = self->ddContext.configuration;
self->mock = std::make_shared<DDMockTxnProcessor>(self->mgs);
@ -121,7 +125,7 @@ struct IDDTxnProcessorApiWorkload : TestWorkload {
// Always set the DD mode back, even if we die with an error
TraceEvent("IDDTxnApiTestDoneMoving").log();
wait(success(setDDMode(cx, oldMode)));
wait(success(setDDMode(cx, 1)));
TraceEvent("IDDTxnApiTestDoneModeSetting").log();
return Void();
}