File tree Expand file tree Collapse file tree 3 files changed +16
-9
lines changed Expand file tree Collapse file tree 3 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ class TKqpNodeService : public TActorBootstrapped<TKqpNodeService> {
210
210
share = 1.0 ;
211
211
}
212
212
std::optional<double > resourceWeight;
213
- if (msg.GetResourceWeight () >= 0 ) {
213
+ if (msg.HasResourceWeight () && msg. GetResourceWeight () >= 0 ) {
214
214
resourceWeight = msg.GetResourceWeight ();
215
215
}
216
216
Original file line number Diff line number Diff line change @@ -188,14 +188,17 @@ class TObservableUpdater {
188
188
189
189
void CollectValues () {
190
190
std::vector<TParameterKey> toerase;
191
- for (auto & [k, v] : Params) {
192
- if (!v.Holder ->HasDependents ()) {
193
- toerase.push_back (k);
191
+ do {
192
+ toerase.clear ();
193
+ for (auto & [k, v] : Params) {
194
+ if (!v.Holder ->HasDependents ()) {
195
+ toerase.push_back (k);
196
+ }
194
197
}
195
- }
196
- for ( auto & key : toerase) {
197
- Params. erase (key);
198
- }
198
+ for ( auto & key : toerase) {
199
+ Params. erase (key);
200
+ }
201
+ } while (!toerase. empty ());
199
202
}
200
203
201
204
private:
@@ -897,7 +900,8 @@ class TCompositeGroupShare : public IObservableValue<double> {
897
900
protected:
898
901
double DoUpdateValue () override {
899
902
if (ResourceWeightEnabled->GetValue ()) {
900
- if (ResourceWeightLimit->Enabled ()->GetValue ()) {
903
+ auto limitEnabled = ResourceWeightLimit->Enabled ();
904
+ if (limitEnabled->GetValue ()) {
901
905
return Min (TotalLimit->GetValue (), ResourceWeightLimit->GetValue ());
902
906
} else {
903
907
return 0 ;
Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ void TWorkersPool::ReleaseWorker(const ui32 workerIdx) {
46
46
47
47
void TWorkersPool::ChangeAmountCPULimit (const double delta) {
48
48
AmountCPULimit += delta;
49
+ if (std::abs (AmountCPULimit) < Eps) {
50
+ AmountCPULimit = 0 ;
51
+ }
49
52
AFL_VERIFY (AmountCPULimit >= 0 );
50
53
Counters.AmountCPULimit ->Set (AmountCPULimit);
51
54
Counters.ChangeCPULimitRate ->Inc ();
You can’t perform that action at this time.
0 commit comments