temporalio / temporalio/sdk-java
Timers are still not canceled if the condition is resolved
Open
@maciejdudko is already working on this.
Since Aug 25, 2026.
- Dominant language
- Java
- Stars
- 433
- Forks
- 249
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 26
Description
Expected Behavior
When an await with a timer resolves via the condition, the timer should be canceled.
Actual Behavior
The timer is not canceled and leaks. The workflow history is confusing.
This was already fixed behind a flag in PR https://github.com/temporalio/sdk-java/pull/2799 but the flag was never subsequently enabled by switching to tryUseSdkFlag.:
Also related to this is: a timer is created even if the condition is immediately satisfied at call time. See this comment: https://github.com/temporalio/sdk-java/issues/2312#issuecomment-2559296304
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.