I'm troubleshooting why async tasks within the durable entity hang forever. My entity looks like this
public MyEntity : IMyEntity {
[JsonIgnore]
private MyService _myService;
[JsonProperty]
public string Property1;
..
..
public Task GetJobs() {
return _myService.GetAllValues(); // this service API invokes a call to the DB
}
}
My orchestrator invokes GetJobslike this
..
..
var entity = new EntityId("MyEntity", id);
var entityProxy = context.CreateEntityProxy<IMyEntity>(MyEntity);
await entityProxy.GetJobs(); // orchestrator hangs forever
I tried the following and nothing helped
restarted the function app
DB is alive and accepting connections.
I've set the debugger inside GetValues method of MyService class and code doesn't even hit there.
What is the root cause of this hang?
This used to work few days before, but all orcs now goes into Running state.
If invocation to DB that returns standard data (no Guids, no Dates) is a non-deterministic call inside a orchestrator, then what else is?
Instead of using entityProxy.GetJobs() , I moved the calls to the DB within a Activity function and this seems to work, but not sure how this would scale.
Looking for a review from experts who has dealt with durable functions.