Fix undefined behaviour in GlobalTagThrottler::get*Rates functions
This commit is contained in:
parent
ae1fc191f1
commit
489b62c29e
|
@ -445,7 +445,7 @@ public:
|
||||||
for (auto& [tag, stats] : tagStatistics) {
|
for (auto& [tag, stats] : tagStatistics) {
|
||||||
// Currently there is no differentiation between batch priority and default priority transactions
|
// Currently there is no differentiation between batch priority and default priority transactions
|
||||||
TraceEvent te("GlobalTagThrottler_GotRate", id);
|
TraceEvent te("GlobalTagThrottler_GotRate", id);
|
||||||
bool isReadBusy, isWriteBusy;
|
bool isReadBusy = false, isWriteBusy = false;
|
||||||
auto const targetTps = getTargetTps(tag, isReadBusy, isWriteBusy, te);
|
auto const targetTps = getTargetTps(tag, isReadBusy, isWriteBusy, te);
|
||||||
if (isReadBusy) {
|
if (isReadBusy) {
|
||||||
++lastBusyReadTagCount;
|
++lastBusyReadTagCount;
|
||||||
|
@ -472,7 +472,7 @@ public:
|
||||||
|
|
||||||
for (auto& [tag, stats] : tagStatistics) {
|
for (auto& [tag, stats] : tagStatistics) {
|
||||||
// Currently there is no differentiation between batch priority and default priority transactions
|
// Currently there is no differentiation between batch priority and default priority transactions
|
||||||
bool isReadBusy, isWriteBusy;
|
bool isReadBusy = false, isWriteBusy = false;
|
||||||
TraceEvent te("GlobalTagThrottler_GotClientRate", id);
|
TraceEvent te("GlobalTagThrottler_GotClientRate", id);
|
||||||
auto const targetTps = getTargetTps(tag, isReadBusy, isWriteBusy, te);
|
auto const targetTps = getTargetTps(tag, isReadBusy, isWriteBusy, te);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue