Skip to content

Timers are still not canceled if the condition is resolved #3012

Description

@rocketraman

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 #2799 but the flag was never subsequently enabled by switching to tryUseSdkFlag.:

// TODO: Change checkSdkFlag to tryUseSdkFlag in the next release to enable this flag by
// default.
boolean cancelTimerOnCondition =
replayContext.checkSdkFlag(SdkFlag.CANCEL_AWAIT_TIMER_ON_CONDITION);

Also related to this is: a timer is created even if the condition is immediately satisfied at call time. See this comment: #2312 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions