File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ bool TSamplingThrottlingControl::TSamplingThrottlingImpl::Throttle(
42
42
bool throttle = true ;
43
43
44
44
auto & requestTypeThrottlingRules = Setup.ExternalThrottlingRules [requestType];
45
- if (auto it = requestTypeThrottlingRules.FindPtr (database)) {
46
- for (auto & throttlingRule : *it ) {
45
+ if (auto databaseThrottlingRules = requestTypeThrottlingRules.FindPtr (database)) {
46
+ for (auto & throttlingRule : *databaseThrottlingRules ) {
47
47
throttle = throttlingRule.Throttler ->Throttle () && throttle;
48
48
}
49
49
}
@@ -54,8 +54,8 @@ TMaybe<ui8> TSamplingThrottlingControl::TSamplingThrottlingImpl::Sample(
54
54
size_t requestType, const TMaybe<TString>& database) {
55
55
TMaybe<ui8> level;
56
56
auto & requestTypeThrottlingRules = Setup.SamplingRules [requestType];
57
- if (auto it = requestTypeThrottlingRules.FindPtr (database)) {
58
- for (auto & samplingRule : *it ) {
57
+ if (auto databaseThrottlingRules = requestTypeThrottlingRules.FindPtr (database)) {
58
+ for (auto & samplingRule : *databaseThrottlingRules ) {
59
59
if (samplingRule.Sampler .Sample () && !samplingRule.Throttler ->Throttle ()) {
60
60
auto sampledLevel = samplingRule.Level ;
61
61
if (!level || sampledLevel > *level) {
You can’t perform that action at this time.
0 commit comments