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

Method Success

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

Source from the content-addressed store, hash-verified

200 AvrgRTT = AvrgRTT * rttMixRate + RTT * (1 - rttMixRate);
201 }
202 void Success() {
203 PacketsInFly -= 1;
204 Y_ASSERT(PacketsInFly >= 0);
205 // FullSpeed should be correct at this point
206 // we assume that after UpdateAlive() we send all packets first then we listen for acks and call Success()
207 // FullSpeed is set in CanSend() during send if we are using full window
208 // do not increaese window while send rate is limited by virtual packets (ie start of transfer)
209 if (FullSpeed && VirtualPackets == 0) {
210 // there are 2 requirements for window growth
211 // 1) growth should be proportional to window size to ensure constant FailRate
212 // 2) growth should be constant to ensure fairness among different flows
213 // so lets make it square root :)
214 Window += sqrt(Window / CONG_CTRL_CHANNEL_INFLATE) * CONG_CTRL_WINDOW_GROW;
215 if (UseTOSforAcks) {
216 Window = Min(Window, MaxWindow);
217 }
218 }
219 FailRate *= 0.99f;
220 }
221 void FailureOnSend() {
222 //printf("Failure on send\n");
223 PacketsInFly -= 1;

Callers 2

AckMethod · 0.45
AckAllMethod · 0.45

Calls 2

sqrtFunction · 0.50
MinFunction · 0.50

Tested by

no test coverage detected