MCPcopy Create free account
hub / github.com/catboost/catboost / Failure

Method Failure

library/cpp/netliba/v6/net_acks.h:228–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226 // do not set FullSpeed since we are not using full Window
227 }
228 void Failure() {
229 //printf("Congestion failure\n");
230 PacketsInFly -= 1;
231 Y_ASSERT(PacketsInFly >= 0);
232 // account limited number of fails per segment
233 if (TimeSinceLastFail > CONG_CTRL_MIN_FAIL_INTERVAL) {
234 TimeSinceLastFail = 0;
235 if (Window <= CONG_CTRL_MIN_WINDOW) {
236 // ping dead hosts less frequently
237 if (PingTracker.GetRTT() / CONG_CTRL_MIN_WINDOW < CONG_CTRL_MINIMAL_SEND_INTERVAL)
238 PingTracker.IncreaseRTT();
239 Window = CONG_CTRL_MIN_WINDOW;
240 VirtualPackets = 0;
241 } else {
242 float windowSubtract = Window * ((1 - CONG_CTRL_WINDOW_SHRINK) / CONG_CTRL_CHANNEL_INFLATE);
243 Window = Max(CONG_CTRL_MIN_WINDOW, Window - windowSubtract);
244 VirtualPackets = Max(0.f, VirtualPackets - windowSubtract);
245 }
246 }
247 FailRate = FailRate * 0.99f + 0.01f;
248 }
249 bool HasPacketsInFly() const {
250 return PacketsInFly > 0;
251 }

Callers 3

ResendMethod · 0.45
~TAckTrackerMethod · 0.45
StepMethod · 0.45

Calls 3

MaxFunction · 0.50
GetRTTMethod · 0.45
IncreaseRTTMethod · 0.45

Tested by

no test coverage detected