You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, it adds a per-resource in-memory container, which is remembered for the whole lifecycle of an operator. This can lead to more memory consumption on big clusters.
It is different from the persistent storage of the object's data directly on the object's status, as the values stored in the in-memory container are specific to that operator process only, and sometimes not serialisable (e.g. threads, tasks, asyncio events, locks, etc).
Second, it remember every object's resuming status in-memory. Once resumed, the object is never resumed again. Otherwise (i.e. currently), the resuming happens on every reconnection of the API watch-stream (partially remedied by #229, but not fully).
More on that, currently (i.e. before fixing), if there are multiple resume handlers or retries or sub-handlers, only the first attempt will be executed. Also, if the on-resume handlers go after the on-create/on-update handlers, they are ignored. All other attempts after the initial listing will not be interpreted as "initial" (due to event's type not being None anymore), thus not detected as resuming.
With this PR, the resume handlers are included into the selection until all of them succeed at least one — even for the regular watch-events with ['type']!=None (i.e. after patching from the previous attempts).
Such approach should improve the following for the @on.resume handlers:
Executed only once per operator process life time (in case of success).
Retried until timeout or retries limit (in case of failures).
Any order of handlers supported (e.g. on-resume handlers after the on-create handlers).
Multiple on-resume handlers supported.
Sub-handlers in the on-resume handlers supported.
Types of Changes
Bug fix (non-breaking change which fixes an issue)
Refactor/improvements
Review
List of tasks the reviewer must do to review the PR
Tests
Documentation
The text was updated successfully, but these errors were encountered:
Description
This PR does two things:
First, it adds a per-resource in-memory container, which is remembered for the whole lifecycle of an operator. This can lead to more memory consumption on big clusters.
It is different from the persistent storage of the object's data directly on the object's status, as the values stored in the in-memory container are specific to that operator process only, and sometimes not serialisable (e.g. threads, tasks, asyncio events, locks, etc).
Second, it remember every object's resuming status in-memory. Once resumed, the object is never resumed again. Otherwise (i.e. currently), the resuming happens on every reconnection of the API watch-stream (partially remedied by #229, but not fully).
More on that, currently (i.e. before fixing), if there are multiple resume handlers or retries or sub-handlers, only the first attempt will be executed. Also, if the on-resume handlers go after the on-create/on-update handlers, they are ignored. All other attempts after the initial listing will not be interpreted as "initial" (due to event's type not being
None
anymore), thus not detected as resuming.With this PR, the resume handlers are included into the selection until all of them succeed at least one — even for the regular watch-events with
['type']!=None
(i.e. after patching from the previous attempts).Such approach should improve the following for the
@on.resume
handlers:Types of Changes
Review
List of tasks the reviewer must do to review the PR
The text was updated successfully, but these errors were encountered: