-
Notifications
You must be signed in to change notification settings - Fork 8
[WIP] Named timers in Durable Task #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
a6fd062
to
4bcbbf0
Compare
@javier-aliaga, we need to validate that this creates timers with the same names as the Go SDK. We also need to validate this against Catalyst, my current approach is to use a modified version in the Java SDK and then run examples to validate the same output. |
client/src/main/java/io/dapr/durabletask/TaskOrchestrationExecutor.java
Outdated
Show resolved
Hide resolved
client/src/main/java/io/dapr/durabletask/TaskOrchestrationExecutor.java
Outdated
Show resolved
Hide resolved
.setId(id) | ||
.setCreateTimer(CreateTimerAction.newBuilder().setFireAt(ts)) | ||
.setCreateTimer(CreateTimerAction.newBuilder() | ||
.setName(name + "-timer-" + id).setFireAt(ts)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't build a name here, just use whatever is provided
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@famarting I need to add the id here to the name, right? So all the instances of the timer have different name, that include the ID
Signed-off-by: salaboy <[email protected]>
Signed-off-by: salaboy <[email protected]>
268b8a9
to
c64af4c
Compare
.setId(id) | ||
.setCreateTimer(CreateTimerAction.newBuilder().setFireAt(ts)) | ||
.setCreateTimer(CreateTimerAction.newBuilder() | ||
.setName(name + "-" + id).setFireAt(ts)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you should add the id here, the name is the name, and whatever is provided should be respected
if (!delay.isZero() && !delay.isNegative()) { | ||
// Use a durable timer to create the delay between retries | ||
this.context.createTimer(delay).await(); | ||
this.context.createTimer(getName() + "-retry",delay).await(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in this case I think this is good, its a made up name, but that it shows that it comes from the activity but is a retry
Issue describing the changes in this PR
based on: dapr/durabletask-go@2fcc964
resolves dapr/java-sdk#1532
Pull request checklist
CHANGELOG.md
Additional information
Additional PR information