[
https://issues.apache.org/jira/browse/YUNIKORN-2319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17810159#comment-17810159
]
Wilfred Spiegelenburg commented on YUNIKORN-2319:
-------------------------------------------------
1, 2 and 3 could, and probably should, use the pod from the cache. Using the
old pod in all these cases might even cause issues.
4 and 5 should only ever happen when a new task gets created. The pod UID does
not change. The annotations are processed as part of the ask generation and for
placeholders. They should not be accessed later for anything we do.
Lets take a deeper look at this and make a proper assessment on this.
> cache.Task: reference to old pod object is kept after update
> ------------------------------------------------------------
>
> Key: YUNIKORN-2319
> URL: https://issues.apache.org/jira/browse/YUNIKORN-2319
> Project: Apache YuniKorn
> Issue Type: Bug
> Components: shim - kubernetes
> Reporter: Peter Bacsko
> Assignee: Peter Bacsko
> Priority: Major
> Attachments: 2024-01-09 134112.png, 2024-01-09 134130.png
>
>
> There is a kind of memory leak in the shim: when the pod is updated, the old
> pod object is still referenced from Task, so the GC has no chance to remove
> it (only when the pod terminates).
> See screenshot: task points to version 80199, scheduler cache already has a
> newer version 81216.
> We have two solutions:
> 1. Update the object in the Task together with the scheduler cache
> 2. Don't store the pointer to the pod, instead, always retrieve it from the
> scheduler cache
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]