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:
@@ -245,7 +245,12 @@ func (a *slotQueue) exitContainerState(conType ContainerStateType) {
|
||||
// a container will be locked up forever waiting for slot to free.
|
||||
func (a *slotQueueMgr) getSlotQueue(call *call) (*slotQueue, bool) {
|
||||
|
||||
key := getSlotQueueKey(call)
|
||||
var key string
|
||||
if call.slotHashId != "" {
|
||||
key = call.slotHashId
|
||||
} else {
|
||||
key = getSlotQueueKey(call)
|
||||
}
|
||||
|
||||
a.hMu.Lock()
|
||||
slots, ok := a.hot[key]
|
||||
|
||||
Reference in New Issue
Block a user