Replies: 1 comment
-
|
I did some experiments to check the Question#2: The eternal durable function will work for 30mins and the timer function triggered every 20s. In the timer function, it checks status of durable function and restart durable function with the same instance id if needed. In the most of the case, I got:
It seems both timer and eternal triggered durable function successfully. but finally, only one orchestrator function is running. In the experiment for around 12 hours, I got one different log like:
It seems sometime, the durable function lost and the timer function did not found the target durable function with the instance id. Based on the experiments, I also want to ask questions:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi team,
We have a use case where we need to pull things indefinitely (hence long running) and persist state periodically.
Originally this was implemented with multiple timer functions (pull from different sources). But because of the nature of timer function & the underlying singleton lock implementation, most of the timers are running on the same worker instance most of the time, and hence causing imbalance on our workers.
We are now looking into using eternal durable function to replace the heavy-lifting work of the timer to load-balance the workers. But we have a few questions that need clarification:
as this is eventually a durable function, the history is stored per taskhub. We use different taskHubs in different slots and during deployment (deploy to staging and swap to prod), looks like it's possible to have 2 eternal durable functions instances running on different slots even if we use the same instance Id (e.g., the old PROD is using taskhub A and is shutting down gracefully; and the new PROD is using a new taskhub and hence is unaware of any instanceId in the old taskhub and decides to enqueue & process the instance)?
would the ContinueAsNew actually complete the durable function instance, or it would just wipe out the history without completing the instance? To make sure we never lose the eternal durable function, we will still have a timer to periodically schedule the eternal durable using the same instanceId (if it exists already, this would then be a no-op), but if the timer runs and tries to start a new durable function around the same time as the ContinueAsNew of the existing running eternal durable, what would happen? Is there any race that I would end up with 2 eternal durables with the same instanceId, even in the same taskhub?
Beta Was this translation helpful? Give feedback.
All reactions