dapr / dapr/java-sdk

Inconsistent behaviour between docs and implementation in Actor Timers and Reminders

Offen
#681 11 Kommentare 0 Reaktionen 1 zugewiesene Person Zugewiesen an @addjuarez Auf GitHub ansehen
area/actor/runtime good first issue kind/bug P1 size/XS triaged/resolved
Vorherrschende Sprache
Java
Sterne
300
Forks
230
Ø Merge
5 T. 1 Std.
Gemergte PRs (30 T.)
5

Beschreibung

While implementing #658 (Adding support for TTL and intervals) I possibly came across some inconsistency with the documentation on Actor Timers and Reminders.

## Expected Behavior

The `dapr-sdk-actors` implementation - the `AbstractActor` class which a client inherits for their own Actor implementation, to be more specific - matches the documentation. Or of course, vice-versa, the documentation matches the implementation.

## Actual Behavior

The [current implementation](https://github.com/dapr/java-sdk/blob/3e5fe3993329df732a1a3e6f5b838df595724145/sdk-actors/src/main/java/io/dapr/actors/runtime/AbstractActor.java#L117) of `registerReminder()` and `registerActorTimer()` in `AbstractActor` requires both `dueTime` and `period` to be present.

I've found the following documentation on Actor Timers:
https://docs.dapr.io/developing-applications/building-blocks/actors/howto-actors/#actor-timers-and-reminders

Which states the following:
> `dueTime` is an **_optional_** parameter that sets time at which or time interval before the callback is invoked for the first time.

> `period` is an **_optional_** parameter that sets time interval between two consecutive callback invocations

[The request structure for reminders is identical to those of actors. Please refer to the actor timers examples.](https://docs.dapr.io/developing-applications/building-blocks/actors/howto-actors/#actor-reminders)

The reference API documentation states the following on Reminders: https://docs.dapr.io/reference/api/actors_api/#create-actor-reminder. I can't seem to find any information about optional fields here, or TTL for that matter.

> `dueTime` | Specifies the time after which the reminder is invoked, its format should be time.ParseDuration format
`period` | Specifies the period between different invocations, its format should be time.ParseDuration format or ISO 8601 duration format with optional recurrence.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.