Skip to content
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

Heartbeat throttling interval should be configurable and default interval should be greater than 0 #906

Closed
bergundy opened this issue Nov 30, 2021 · 0 comments · Fixed by #943
Assignees
Labels
enhancement User experience
Milestone

Comments

@bergundy
Copy link
Member

bergundy commented Nov 30, 2021

The Java SDK should implement the new heartbeat throttling behavior:

Add 2 new WorkerOptions:

  • maxHeartbeatThrottleInterval - default 60s
  • defaultHeartbeatThrottleInterval - default 30s

throttleInterval = min(

heartbeat_timeout * .8 if heartbeat_timeout is provided

else defaultHeartbeatThrottleInterval

, maxHeartbeatThrottleInterval)

Rationale

  • Make the behavior explicit and configurable
  • Keep the behavior backwards compatible
    • Java currently has an implicit maximum (30s) and default (0)
    • Go has an implicit default (10m) and no maximum
    • Core is not yet stable, from user feedback the behavior is confusing
  • Not heartbeating means no cancellations, need a default value
  • Consistency between the SDKs

GoSDK equivalent task: temporalio/sdk-go#656

@bergundy bergundy added the enhancement User experience label Nov 30, 2021
Spikhalskiy added a commit to Spikhalskiy/java-sdk that referenced this issue Jan 3, 2022
Spikhalskiy added a commit to Spikhalskiy/java-sdk that referenced this issue Jan 3, 2022
Spikhalskiy added a commit to Spikhalskiy/java-sdk that referenced this issue Jan 3, 2022
@Spikhalskiy Spikhalskiy self-assigned this Jan 3, 2022
@Spikhalskiy Spikhalskiy added this to the 1.7.0 milestone Jan 3, 2022
Spikhalskiy added a commit to Spikhalskiy/java-sdk that referenced this issue Jan 3, 2022
Spikhalskiy added a commit to Spikhalskiy/java-sdk that referenced this issue Jan 3, 2022
Spikhalskiy added a commit to Spikhalskiy/java-sdk that referenced this issue Jan 3, 2022
Spikhalskiy added a commit to Spikhalskiy/java-sdk that referenced this issue Jan 3, 2022
Spikhalskiy pushed a commit that referenced this issue Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement User experience
Projects
None yet
2 participants