mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
fn: lb & pure-runner slot hash id communication (#1007)
* fn: lb & pure-runner slot hash id communication With this change, LB can pre-calculate the slot hash key and pass it to runners. If LB knows/calculates the slot hash ids, then it can also make better estimates on which runner can successfully execute it especially when status messages from runner include a small summary of idle slots for a given slot hash id. (TODO) * fn: fix mock test
This commit is contained in:
@@ -124,7 +124,10 @@ func (r *gRPCRunner) TryExec(ctx context.Context, call pool.RunnerCall) (bool, e
|
||||
|
||||
// After this point, we assume "COMMITTED" unless pure runner
|
||||
// send explicit NACK
|
||||
err = runnerConnection.Send(&pb.ClientMsg{Body: &pb.ClientMsg_Try{Try: &pb.TryCall{ModelsCallJson: string(modelJSON)}}})
|
||||
err = runnerConnection.Send(&pb.ClientMsg{Body: &pb.ClientMsg_Try{Try: &pb.TryCall{
|
||||
ModelsCallJson: string(modelJSON),
|
||||
SlotHashId: call.SlotHashId(),
|
||||
}}})
|
||||
if err != nil {
|
||||
logrus.WithError(err).Error("Failed to send message to runner node")
|
||||
return true, err
|
||||
|
||||
Reference in New Issue
Block a user