change workload; solve some comments

This commit is contained in:
XiaoxiWang 2020-09-08 17:28:47 +00:00
parent c3e153b5d9
commit 2935d3d4f6
3 changed files with 4 additions and 26 deletions

View File

@ -354,7 +354,7 @@ const KeyRef JSONSchemas::statusSchema = LiteralStringRef(R"statusSchema(
"busy_read" : 0,
"busy_write" : 0,
"count" : 0,
"is_recommended": 0
"recommended_only": 0
},
"manual" : {
"count" : 0

View File

@ -1632,7 +1632,7 @@ static Future<vector<std::pair<iface, EventMap>>> getServerMetrics(vector<iface>
ACTOR template <class iface>
static Future<vector<TraceEventFields>> getServerBusiestWriteTags(vector<iface> servers, std::unordered_map<NetworkAddress, WorkerInterface> address_workers, WorkerDetails rkWorker) {
state vector<Future<Optional<TraceEventFields>>> futures;
for (auto s : servers) {
for (const auto& s : servers) {
futures.push_back(latestEventOnWorker(rkWorker.interf, s.id().toString() + "/BusiestWriteTag"));
}
wait(waitForAll(futures));
@ -1876,10 +1876,10 @@ ACTOR static Future<JsonBuilderObject> workloadStatusFetcher(Reference<AsyncVar<
autoThrottledTagsObj["busy_read"] = autoThrottledTagsBusyRead;
autoThrottledTagsObj["busy_write"] = autoThrottledTagsBusyWrite;
if(autoThrottlingEnabled) {
autoThrottledTagsObj["is_recommended"] = 0;
autoThrottledTagsObj["recommended_only"] = 0;
}
else {
autoThrottledTagsObj["is_recommended"] = 1;
autoThrottledTagsObj["recommended_only"] = 1;
}
throttledTagsObj["auto"] = autoThrottledTagsObj;

View File

@ -26,7 +26,6 @@
#include "flow/actorcompiler.h" // This must be the last #include.
struct TagThrottleApiWorkload : TestWorkload {
int apiVersion;
bool autoThrottleEnabled;
double testDuration;
@ -45,20 +44,6 @@ struct TagThrottleApiWorkload : TestWorkload {
}
virtual Future<Void> start(Database const& cx) {
// choose a version to check compatibility.
double choice = deterministicRandom()->random01();
if(choice < 0.3) {
apiVersion = 630;
}
else if(choice < 0.7){
apiVersion = 700;
}
else {
apiVersion = Database::API_VERSION_LATEST;
}
TraceEvent("VersionStampApiVersion").detail("ApiVersion", apiVersion);
cx->apiVersion = apiVersion;
if (this->clientId != 0) return Void();
return timeout(runThrottleApi(this, cx), testDuration, Void());
}
@ -164,10 +149,6 @@ struct TagThrottleApiWorkload : TestWorkload {
else if(tag.expirationTime > now()) {
++activeAutoThrottledTags;
}
if(self->apiVersion == 630) {
ASSERT(tag.reason == TagThrottledReason::UNSET);
}
}
ASSERT(manualThrottledTags <= SERVER_KNOBS->MAX_MANUAL_THROTTLED_TRANSACTION_TAGS);
@ -191,9 +172,6 @@ struct TagThrottleApiWorkload : TestWorkload {
for(auto& tag : tags) {
ASSERT(tag.throttleType == TagThrottleType::AUTO);
if(self->apiVersion == 630) {
ASSERT(tag.reason == TagThrottledReason::UNSET);
}
}
return Void();
}