Mallikarjuna NALLAGUNDLA Thanks for posting your question in Microsoft Q&A. Yes, you are correct that you need to call TerminateAsync
in Durable Functions 2.x as described in Terminate instances doc (terminate
in other languages). However, the instance will not move to Terminated
state immediately rather the terminate operation will be queued and you can use instance query to know the status.
If you observe that orchestration never ends and still in running state after a period of time, then it might be stuck, and we need to diagnose which requires investigation of backend logs of the durable function instance. I see a similar discussion related to history load failure, and possibly there could be other reasons as well. Sorry for the experience caused by this issue.
So, I suggest you open a support ticket with azure support team, or feel free to submit a new issue via https://github.com/Azure/azure-functions-durable-extension/issues so that our product team can assist you further. If you don't have a support plan and would like to submit a ticket, let me know. I would be happy to assist you with that. I hope this helps and let me know if you have any questions.