Skip to content

Commit e501b21

Browse files
committed
[1.17] Remove reference to SchedulerReminders feature gate
As of 1.17, Dapr no longer supports the `SchedulerReminders` feature gate meaning all actor reminders are managed via Scheduler. PR removes all reference to it, including documentation on reminder migration & old configuration for the legacy "state" reminders. Signed-off-by: joshvanl <[email protected]>
1 parent cce49a6 commit e501b21

9 files changed

Lines changed: 26 additions & 285 deletions

File tree

daprdocs/content/en/concepts/dapr-services/scheduler.md

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ The Dapr Scheduler service is used to schedule different types of jobs, running
1010
- Actor reminder jobs (used by the actor reminders)
1111
- Actor reminder jobs created by the Workflow API (which uses actor reminders)
1212

13-
From Dapr v1.15, the Scheduler service is used by default to schedule actor reminders as well as actor reminders for the Workflow API.
14-
15-
There is no concept of a leader Scheduler instance. All Scheduler service replicas are considered peers. All receive jobs to be scheduled for execution and the jobs are allocated between the available Scheduler service replicas for load balancing of the trigger events.
13+
There is no concept of a leader Scheduler instance.
14+
All Scheduler service replicas are considered peers.
15+
All receive jobs to be scheduled for execution and the jobs are allocated between the available Scheduler service replicas for load balancing of the trigger events.
1616

1717
The diagram below shows how the Scheduler service is used via the jobs API when called from your application. All the jobs that are tracked by the Scheduler service are stored in the Etcd database.
1818

@@ -21,35 +21,17 @@ The diagram below shows how the Scheduler service is used via the jobs API when
2121
By default, Etcd is embedded in the Scheduler service, which means that the Scheduler service runs its own instance of Etcd.
2222
See [Scheduler service flags]({{% ref "#flag-tuning" %}}) for more information on how to configure the Scheduler service.
2323

24-
## Actor Reminders
25-
26-
Prior to Dapr v1.15, [actor reminders]({{% ref "actors-timers-reminders#actor-reminders" %}}) were run using the Placement service. Now, by default, the [`SchedulerReminders` feature flag]({{% ref "support-preview-features#current-preview-features" %}}) is set to `true`, and all new actor reminders you create are run using the Scheduler service to make them more scalable.
27-
28-
When you deploy Dapr v1.15, any _existing_ actor reminders are automatically migrated from the Actor State Store to the Scheduler service as a one time operation for each actor type. Each replica will only migrate the reminders whose actor type and id are associated with that host. This means that only when all replicas implementing an actor type are upgraded to 1.15, will all the reminders associated with that type be migrated. There will be _no_ loss of reminder triggers during the migration. However, you can prevent this migration and keep the existing actor reminders running using the Actor State Store by setting the `SchedulerReminders` flag to `false` in the application configuration file for the actor type.
29-
30-
To confirm that the migration was successful, check the Dapr sidecar logs for the following:
31-
32-
```sh
33-
Running actor reminder migration from state store to scheduler
34-
```
35-
coupled with
36-
```sh
37-
Migrated X reminders from state store to scheduler successfully
38-
```
39-
or
40-
```sh
41-
Skipping migration, no missing scheduler reminders found
42-
```
43-
4424
## Job Locality
4525

4626
### Default Job Behavior
4727

48-
By default, when the Scheduler service triggers jobs, they are sent back to a single replica for the same app ID that scheduled the job in a randomly load balanced manner. This provides basic load balancing across your application's replicas, which is suitable for most use cases where strict locality isn't required.
28+
When the Scheduler service triggers jobs, they are sent back to a single replica for the same app ID that scheduled the job in a randomly load balanced manner.
29+
This provides basic load balancing across your application's replicas, which is suitable for most use cases where strict locality isn't required.
4930

5031
### Using Actor Reminders for Perfect Locality
5132

52-
For users who require perfect job locality (having jobs triggered on the exact same host that created them), actor reminders provide a solution. To enforce perfect locality for a job:
33+
For users who require perfect job locality (having jobs triggered on the exact same host that created them), actor reminders provide a solution.
34+
To enforce perfect locality for a job:
5335

5436
1. Create an actor type with a random UUID that is unique to the specific replica
5537
2. Use this actor type to create an actor reminder
@@ -60,7 +42,7 @@ This approach ensures that the job will always be triggered on the same host whi
6042

6143
### Job Failure Policy and Staging Queue
6244

63-
When the Scheduler service triggers a job and it has a client side error, the job is retried by default with a 1s interval and 3 maximum retries.
45+
When the Scheduler service triggers a job and it has a client side error, the job is retried by default with a 1s interval and 3 maximum retries.
6446

6547
For non-client side errors, for example, when a job cannot be sent to an available Dapr sidecar at trigger time, it is placed in a staging queue within the Scheduler service. Jobs remain in this queue until a suitable sidecar instance becomes available, at which point they are automatically sent to the appropriate Dapr sidecar instance.
6648

@@ -191,16 +173,20 @@ dapr scheduler delete-all actor/MyActorType
191173

192174
### Backup and restore jobs
193175

194-
Export all jobs to a file:
176+
In production environments, it's recommended to perform periodic backups of this data at an interval that aligns with your recovery point objectives.
177+
The Dapr CLI provides a command for exporting all Scheduler data to a specific binary file.
178+
Use the `-k` flag when running in Kubernetes mode.
195179

196-
```bash
197-
dapr scheduler export -o backup.bin
180+
```shell
181+
dapr scheduler export --output-file scheduler-backup.db
182+
dapr scheduler export -k --output-file scheduler-backup.db
198183
```
199184

200-
Re-import jobs from a backup file:
185+
To restore data from a backup file:
201186

202-
```bash
203-
dapr scheduler import -f backup.bin
187+
```shell
188+
dapr scheduler import --input-file scheduler-backup.db
189+
dapr scheduler import -k --input-file scheduler-backup.db
204190
```
205191

206192
## Monitoring Scheduler's etcd Metrics
@@ -216,7 +202,6 @@ Fine tune the embedded etcd to your needs by [reviewing and configuring the Sche
216202
## Disabling the Scheduler service
217203

218204
If you are not using any features that require the Scheduler service (Jobs API, Actor Reminders, or Workflows), you can disable it by setting `global.scheduler.enabled=false`.
219-
220205
For more information on running Dapr on Kubernetes, visit the [Kubernetes hosting page]({{% ref kubernetes %}}).
221206

222207
## Flag tuning

daprdocs/content/en/developing-applications/building-blocks/actors/actor-reentrancy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ A core tenet of the [virtual actor pattern](https://www.microsoft.com/research/p
1010

1111
Reentrancy solves this by allowing requests from the same chain, or context, to re-enter into an already locked actor. This proves useful in scenarios where:
1212
- An actor wants to call a method on itself
13-
- Actors are used in workflows to perform work, then call back onto the coordinating actor.
13+
- Actors are used in workflows to perform work, then call back onto the coordinating actor.
1414

1515
Examples of chains that reentrancy allows are shown below:
1616

daprdocs/content/en/developing-applications/building-blocks/actors/actors-features-concepts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Now that you've learned about the [actor building block]({{% ref "actors-overvie
1414

1515
Dapr actors are virtual, meaning that their lifetime is not tied to their in-memory representation. As a result, they do not need to be explicitly created or destroyed. The Dapr actor runtime automatically activates an actor the first time it receives a request for that actor ID. If an actor is not used for a period of time, the Dapr actor runtime garbage-collects the in-memory object. It will also maintain knowledge of the actor's existence should it need to be reactivated later.
1616

17-
Invocation of actor methods, timers, and reminders reset the actor idle time. For example, a reminder firing keeps the actor active.
17+
Invocation of actor methods, timers, and reminders reset the actor idle time. For example, a reminder firing keeps the actor active.
1818
- Actor reminders fire whether an actor is active or inactive. If fired for an inactive actor, it activates the actor first.
1919
- Actor timers firing reset the idle time; however, timers only fire while the actor is active.
2020

@@ -101,4 +101,4 @@ The following example illustrates the above concepts. Consider an actor type tha
101101

102102
- [Actors API reference]({{% ref actors_api %}})
103103
- [Actors overview]({{% ref actors-overview %}})
104-
- [How to: Use virtual actors in Dapr]({{% ref howto-actors %}})
104+
- [How to: Use virtual actors in Dapr]({{% ref howto-actors %}})

daprdocs/content/en/developing-applications/building-blocks/actors/actors-runtime-config.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ weight: 30
66
description: Modify the default Dapr actor runtime configuration behavior
77
---
88

9-
You can modify the default Dapr actor runtime behavior using the following configuration parameters.
9+
You can modify the default Dapr actor runtime behavior using the following configuration parameters.
1010

1111
| Parameter | Description | Default |
1212
| --------- | ----------- | ------- |
@@ -16,7 +16,6 @@ You can modify the default Dapr actor runtime behavior using the following confi
1616
| `drainOngoingCallTimeout` | The duration when in the process of draining rebalanced actors. This specifies the timeout for the current active actor method to finish. If there is no current actor method call, this is ignored. | 60 seconds |
1717
| `drainRebalancedActors` | If true, Dapr will wait for `drainOngoingCallTimeout` duration to allow a current actor call to complete before trying to deactivate an actor. | true |
1818
| `reentrancy` (`ActorReentrancyConfig`) | Configure the reentrancy behavior for an actor. If not provided, reentrancy is disabled. | disabled, false |
19-
| `remindersStoragePartitions` | Configure the number of partitions for actor's reminders. If not provided, all reminders are saved as a single record in actor's state store. | 0 |
2019
| `entitiesConfig` | Configure each actor type individually with an array of configurations. Any entity specified in the individual entity configurations must also be specified in the top level `entities` field. | N/A |
2120

2221
## Examples
@@ -39,7 +38,6 @@ public void ConfigureServices(IServiceCollection services)
3938
options.ActorScanInterval = TimeSpan.FromSeconds(30);
4039
options.DrainOngoingCallTimeout = TimeSpan.FromSeconds(60);
4140
options.DrainRebalancedActors = true;
42-
options.RemindersStoragePartitions = 7;
4341
options.ReentrancyConfig = new() { Enabled = false };
4442

4543
// Add a configuration for a specific actor type.
@@ -81,7 +79,6 @@ const clientOptions = {
8179
enabled: true,
8280
maxStackDepth: 32,
8381
},
84-
remindersStoragePartitions: 0,
8582
},
8683
};
8784

@@ -112,7 +109,6 @@ ActorRuntime.set_actor_config(
112109
drain_ongoing_call_timeout=timedelta(minutes=1),
113110
drain_rebalanced_actors=True,
114111
reentrancy=ActorReentrancyConfig(enabled=False),
115-
remindersStoragePartitions=7
116112
)
117113
)
118114
```
@@ -134,7 +130,6 @@ ActorRuntime.getInstance().getConfig().setActorScanInterval(Duration.ofSeconds(3
134130
ActorRuntime.getInstance().getConfig().setDrainOngoingCallTimeout(Duration.ofSeconds(60));
135131
ActorRuntime.getInstance().getConfig().setDrainBalancedActors(true);
136132
ActorRuntime.getInstance().getConfig().setActorReentrancyConfig(false, null);
137-
ActorRuntime.getInstance().getConfig().setRemindersStoragePartitions(7);
138133
```
139134

140135
[See the documentation on writing actors with the Java SDK]({{% ref "java#actors" %}}).

daprdocs/content/en/developing-applications/building-blocks/actors/actors-timers-reminders.md

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ aliases:
1010

1111
Actors can schedule periodic work on themselves by registering either timers or reminders.
1212

13-
The functionality of timers and reminders is very similar. The main difference is that Dapr actor runtime is not retaining any information about timers after deactivation, while persisting the information about reminders using Dapr actor state provider.
13+
The functionality of timers and reminders is very similar. The main difference is that Dapr actor runtime is not retaining any information about timers after deactivation, while persisting the information about reminders using Dapr [Scheduler]({{% ref scheduler.md %}}).
1414

1515
This distinction allows users to trade off between light-weight but stateless timers vs. more resource-demanding but stateful reminders.
1616

@@ -108,10 +108,6 @@ Refer [api spec]({{% ref "actors_api#invoke-timer" %}}) for more details.
108108

109109
## Actor reminders
110110

111-
{{% alert title="Note" color="primary" %}}
112-
In Dapr v1.15, actor reminders are stored by default in the [Scheduler service]({{% ref "scheduler#actor-reminders" %}}). When upgrading to Dapr v1.15 all existing reminders are automatically migrated to the Scheduler service with no loss of reminders as a one time operation for each actor type.
113-
{{% /alert %}}
114-
115111
Reminders are a mechanism to trigger *persistent* callbacks on an actor at specified times. Their functionality is similar to timers. But unlike timers, reminders are triggered under all circumstances until the actor explicitly unregisters them or the actor is explicitly deleted or the number in invocations is exhausted. Specifically, reminders are triggered across actor deactivations and failovers because the Dapr actor runtime persists the information about the actors' reminders using Dapr actor state provider.
116112

117113
You can create a persistent reminder for an actor by calling the HTTP/gRPC request to Dapr as shown below, or via Dapr SDK.
@@ -146,7 +142,7 @@ Refer [api spec]({{% ref "actors_api#invoke-reminder" %}}) for more details.
146142

147143
## Error handling
148144

149-
When an actor's method completes successfully, the runtime will continue to invoke the method at the specified timer or reminder schedule. However, if the method throws an exception, the runtime catches it and logs the error message in the Dapr sidecar logs, without retrying.
145+
When an actor's method completes successfully, the runtime will continue to invoke the method at the specified timer or reminder schedule. However, if the method throws an exception, the runtime catches it and logs the error message in the Dapr sidecar logs, without retrying.
150146

151147
To allow actors to recover from failures and retry after a crash or restart, you can persist an actor's state by configuring a state store, like Redis or Azure Cosmos DB.
152148

@@ -155,38 +151,6 @@ If an invocation of the method fails, the timer is not removed. Timers are only
155151
- The executions run out
156152
- You delete it explicitly
157153

158-
## Reminder data serialization format
159-
160-
Actor reminder data is serialized to JSON by default. Dapr v1.13 onwards supports a protobuf serialization format for internal reminders data for workflow via both the Placement and Scheduler services. Depending on throughput and size of the payload, this can result in significant performance improvements, giving developers a higher throughput and lower latency.
161-
162-
Another benefit is storing smaller data in the actor underlying database, which can result in cost optimizations when using some cloud databases. A restriction with using protobuf serialization is that the reminder data can no longer be queried.
163-
164-
{{% alert title="Note" color="primary" %}}
165-
Protobuf serialization will become the default format in Dapr 1.14
166-
{{% /alert %}}
167-
168-
Reminder data saved in protobuf format cannot be read in Dapr 1.12.x and earlier versions. Its recommended to test this feature in Dapr v1.13 and verify that it works as expected with your database before taking this into production.
169-
170-
{{% alert title="Note" color="primary" %}}
171-
If you use protobuf serialization in Dapr v1.13 and need to downgrade to an earlier Dapr version, the reminder data will be incompatible with versions 1.12.x and earlier versions. **Once you save your reminders data in protobuf format, you cannot move it back to JSON format**.
172-
{{% /alert %}}
173-
174-
### Enabling protobuf serialization on Kubernetes
175-
176-
To use protobuf serialization for actor reminders on Kubernetes, use the following Helm value:
177-
178-
```
179-
--set dapr_placement.maxActorApiLevel=20
180-
```
181-
182-
### Enabling protobuf serialization on self-hosted
183-
184-
To use protobuf serialization for actor reminders on self-hosted, use the following `daprd` flag:
185-
186-
```
187-
--max-api-level=20
188-
```
189-
190154
## Managing reminders with the CLI
191155

192156
Actor reminders are persisted in the Scheduler.

0 commit comments

Comments
 (0)