[ 
https://issues.apache.org/jira/browse/YUNIKORN-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17458878#comment-17458878
 ] 

Wilfred Spiegelenburg commented on YUNIKORN-462:
------------------------------------------------

Yes I do propose folding the two into one. As you already showed in the two 
links given above we process a new allocation in the core twice in the same 
method: {{{}notifyRMNewAllocation(){}}}. We first perform a call to tell the 
shim that the allocation is made (sync callback) and then send the same 
information again via an event (async callback).

We perform the same steps in reversed order when we release an allocation. The 
context has a method called {{processAllocationReleases()}} for that case.
We send the release via an event (async callback) and then send the same info 
via a direct call (sync callback).

Since we are sending the same details in both call why can we not make one call 
between the core and the shim? The shim _should_ then immediately perform the 
required updates. It also _should_ kick off any long running updates in the 
background. The quick updates should be all that is done now as part of the 
sync callback. Before returning as part of the sync processing we fork of, in 
the background, whatever slow process is now triggered by the event.

Thus what I am proposing is that we do one of the following two things:
 # make the event a sync call and remove the plugin call
 # remove the event, the plugin call will trigger all that is needed

I think option 1 is the correct way to implement this. That way it is not 
k8shim specific and we still get the sync process we want/need. 

> Streamline core to shim update on allocation change
> ---------------------------------------------------
>
>                 Key: YUNIKORN-462
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-462
>             Project: Apache YuniKorn
>          Issue Type: Sub-task
>          Components: core - scheduler, shim - kubernetes
>            Reporter: Wilfred Spiegelenburg
>            Assignee: Manikandan R
>            Priority: Major
>
> Currently in the scheduler we have two updates that get send to the shim when 
> an allocation is added or released:
> * event to shim RM event handler to allocate
> * reconciler plugin to update the shim caches
> Before YUNIKORN-317 one update was made in the cace the other in the 
> scheduler. Now they are both in the scheduler in quick succession. The cache 
> update in the shim is needed to make sure that the predicates are seeing the 
> correct info. The event does the real bind etc of the allocation on the node.
> We should be able to fold the two calls into one call. However this requires 
> changes on both sides and might even impact the SI as it will likely become a 
> synced event call.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to