-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
Description
Invoking DurableTaskClient.PurgeInstanceAsync with PurgeInstanceOptions.Recursive = true does not result in sub-orchestrations being purged. The documentation for this method states that sub-orchestrations should be purged when this flag is set.
Example:
var purgeInstanceOptions = new PurgeInstanceOptions
{
Recursive = true
};
await client.PurgeInstanceAsync("my_instance_id", purgeInstanceOptions);with rows in the Instances table that have ParentInstanceID=my_instance_id (in addition to the required InstanceID=my_instance_id row that has a RuntimeStatus of Completed, Terminated, or Failed), executes the following SQL:
declare @p1 dt.InstanceIDs
insert into @p1 values('my_instance_id')
exec dt.PurgeInstanceStateByID @InstanceIDs=@p1(Stored procedure PurgeInstanceStateByID only uses the provided InstanceIDs - it does not perform a recursive CTE.)