fixed the local ratekeeper workload to match the logic on the storage server

This commit is contained in:
Evan Tschannen 2019-06-25 18:09:27 -07:00 committed by Alex Miller
parent a97940a10b
commit ec16688db1
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ struct LocalRatekeeperWorkload : TestWorkload {
if (durabilityLag >= SERVER_KNOBS->STORAGE_DURABILITY_LAG_HARD_MAX) {
expectedRateLimit = 0.0;
} else if (durabilityLag > SERVER_KNOBS->TARGET_VERSIONS_PER_STORAGE_SERVER) {
expectedRateLimit = 1.0 - double(durabilityLag) / double(SERVER_KNOBS->STORAGE_DURABILITY_LAG_HARD_MAX);
expectedRateLimit = 1.0 - double(durabilityLag-SERVER_KNOBS->TARGET_VERSIONS_PER_STORAGE_SERVER) / double(SERVER_KNOBS->STORAGE_DURABILITY_LAG_HARD_MAX-SERVER_KNOBS->TARGET_VERSIONS_PER_STORAGE_SERVER);
}
if (expectedRateLimit < metrics.localRateLimit - 0.01 || expectedRateLimit > metrics.localRateLimit + 0.01) {
self->testFailed = true;