Skip to content

Commit eba1cea

Browse files
committed
add clarification around terminal/non-terminal and the retention period
Signed-off-by: Hannah Hunter <[email protected]>
1 parent e96d2f2 commit eba1cea

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

articles/azure-functions/durable/durable-task-scheduler/durable-task-scheduler-auto-purge.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,19 @@ Autopurge operates asynchronously in the background, optimized to minimize syste
1313

1414
## How it works
1515

16-
Autopurge is an opt-in feature. You can enable it by defining retention policies that control how long to keep the data of orchestrations in certain statuses. The autopurge feature purges orchestration data associated only with the following statuses:
16+
Autopurge is an opt-in feature. You can enable it by defining retention policies that control how long to keep the data of orchestrations in certain statuses. The autopurge feature purges orchestration data associated with terminal statuses. "Terminal" refers to an orchestration state that no longer results in triggering work items. Terminal statuses include:
1717
- `Completed`
1818
- `Failed`
1919
- `Canceled`
2020
- `Terminated`
2121

22-
Autopurge ignores orchestration data associated with the following statuses:
22+
Autopurge ignores orchestration data associated with non-terminal statuses. "Non-terminal" refers to an orchestration that is running, paused, or waiting for a worker. These statuses include:
2323
- `Pending`
2424
- `Running`
25+
- `Suspended`
26+
- `Continued_As_New`
2527

26-
[Once enabled,](#enable-autopurge) autopurge periodically deletes orchestration data older than the retention period you set.
28+
[Once enabled,](#enable-autopurge) autopurge periodically deletes orchestration data older than the retention period you set. Autopurge only
2729

2830
> [!NOTE]
2931
> Retention policies you define are applied to **all** task hubs in a scheduler.
@@ -32,6 +34,8 @@ Autopurge ignores orchestration data associated with the following statuses:
3234

3335
Retention value can range from 0 (purge as soon as possible) to the maximum integer value, with the unit being **days**.
3436

37+
The retention period refers to the time period since the orchestration entered terminal state. For example, you set a retention value of 1 day. If the orchestration takes 10 days to finish, autopurge won't delete it until the following day. Autopurge isn't triggered until the orchestration finishes.
38+
3539
Although retention periods have no maximum limit, we recommend you avoid retaining large volumes of stale orchestration data for extended periods. This practice ensures efficient use of storage resources and maintains optimal app performance.
3640

3741
### Types of policies
@@ -149,7 +153,8 @@ If creation is successful, you receive the following response.
149153
}
150154
```
151155

152-
Learn more about the retention policy `create` command by running `az durabletask retention-policy create --help`.
156+
> [!TIP]
157+
> Learn more about the retention policy command via [the CLI reference][TODO].
153158
154159
# [Azure Resource Manager](#tab/arm)
155160

@@ -224,7 +229,7 @@ resource exampleResource 'Microsoft.DurableTask/schedulers/retentionPolicies@202
224229
properties: {
225230
retentionPolicies: [
226231
{
227-
retentionPeriodInDays: 30
232+
retentionPeriodInDays: 1
228233
}
229234
{
230235
"retentionPeriodInDays": 0,
@@ -247,7 +252,7 @@ resource exampleResource 'Microsoft.DurableTask/schedulers/retentionPolicies@202
247252
Delete the retention policies using the following command. The Durable Task Scheduler stops cleaning orchestration data within 5 to 10 minutes.
248253

249254
```azurecli
250-
az durabletask retention-poliby delete --scheduler-name SCHEDULER_NAME --resource-group RESOURCE_GROUP
255+
az durabletask retention-policy delete --scheduler-name SCHEDULER_NAME --resource-group RESOURCE_GROUP
251256
```
252257

253258
# [Azure Resource Manager](#tab/arm)

0 commit comments

Comments
 (0)