Closed mol-pensiondk closed 1 year ago
@mol-pensiondk can you provide a simple reproducer for this? Nearly all of our orchestration integration tests indirectly depend on this API (reference).
@cgillum: While simplifying my code to provide a reproducer, I found that the problem is actually not (as I originally thought) that the task never finishes, but rather that the call to WaitForOrchestrationAsync
itself throws an exception (this was hidden from me before because the code making the call ran in a background task that was not awaited). The problem is that here the constructor of CancellationToken
throws because TimeSpan.MaxValue
is out of range. Replacing TimeSpan.MaxValue
in my call with TimeSpan.FromMilliseconds(Int32.MaxValue)
avoids this and then the task is started and finishes on orchestration completion as expected.
The Azure Storage backend accepts TimeSpan.MaxValue
and it would be nice if the MSSQL backend too would not limit the TimeSpan
values allowed in WaitForOrchestrationAsync
; TimeSpan.MaxValue
is to me a natural way to indicate that no timeout is wanted.
The call
never finishes (that is, the task never finishes) with the MSSQL backend. It works fine with the Azure Storage backend, returning the orchestration status once the given orchestration instance has reached a final state.