Closed vadmeste closed 8 months ago
@poornas sorry I am not able to understand. Are you saying there is an issue in this PR or an issue in unrelated another code ?
Also this
backend.Stats.CurrentCalls.Add(-1)
backend.Stats.LastFinished.Store(time.Now().UnixNano())
is executed after the call finishes already. nextProxy() returns a function that will be executed when the call finishes
is executed after the call finishes already. nextProxy() returns a function that will be executed when the call finishes
oops, you are right. missed that
@vadmeste ,
this should be done in UpdateCallStats after the call finishes, not after choosing the backend - otherwise it will always pick the last backend. your fix will only make it work to pick a random backend which is anyway the default.