Task Extension at the Backend Interface #285
decibelcooper
started this conversation in
General
Replies: 1 comment 1 reply
-
The idea is somewhat like this: sequenceDiagram
Worker->>+Backend: GetTask
Backend-->>-Worker: GetTask
Worker->>+Executor: ExecuteTask
Note right of Worker: Some time passes, need to extend lock
Worker->>+Backend: ExtendTask
Backend-->>-Worker: ExtendTask
Note right of Worker: Some time passes
Worker->>+Backend: ExtendTask
Backend-->>-Worker: ExtendTask
Executor-->>-Worker: ExecuteTask
Worker->>+Backend: CompleteTask
Backend-->>-Worker: CompleteTask
If it takes longer than the lock timeout for the executor to finish a task, we need to extend the lock for the task to prevent another worker from work-stealing the task assuming the original worker crashed. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm struggling to see the vision for the ExtendWorkflowTask and ExtendActivityTask Backend methods. Today, it looks like these are not yet used by go-workflows. Additionally, the lock timeout duration is not exposed through the Backend interface, so one would have to have knowledge of the implementation to know what the duration is.
It seems to me that locks durations/deadlines for *Tasks should be something exposed through through the interface, on the *Task itself. Perhaps per-task timeouts could be defined or hinted by event metadata down the road without further change to the Backend interface.
Beta Was this translation helpful? Give feedback.
All reactions