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

feat: Add tracking of heartbeat results and executions with stale heartbeat #432

Merged
merged 7 commits into from
Mar 11, 2024

Conversation

kagkarlsson
Copy link
Owner

@kagkarlsson kagkarlsson commented Oct 25, 2023

Add tracking of heartbeat results and executions with stale heartbeat to enable acting on failing heartbeats.

  • Configurable number of heartbeats before considered dead (minimum is 4)
    • New method schedulerBuilder.missedHeartbeatsLimit(<limit>)
  • Increase default limit for missed heartbeats before considered dead from 4 to 6
  • Track the number of failed heartbeats and make it available to users
    • New ExecutionContext method, ctx.getCurrentlyExecuting().getHeartbeatState().getFractionDead()
  • New scheduler methods for checking for stale heartbeats
    • scheduler.getCurrentlyExecutingWithStaleHeartbeat()
    • scheduler.getCurrentlyExecuting().get(0).getHeartbeatState().getFractionDead()
  • New SchedulerStatsEvents in StatsRegistry: FAILED_HEARTBEAT, FAILED_MULTIPLE_HEARTBEATS (replaces UNEXPECTED_ERROR for failed heartbeats)
  • New example HeartbeatMonitoringMain

Fixes

Reminders

  • Added/ran automated tests
  • Update README and/or examples
  • Ran mvn spotless:apply

@kagkarlsson kagkarlsson changed the title Add tracking of heartbeat results and executions with stale heartbeat feat: Add tracking of heartbeat results and executions with stale heartbeat Dec 6, 2023
@kagkarlsson kagkarlsson marked this pull request as ready for review December 6, 2023 15:34
@kagkarlsson
Copy link
Owner Author

@PiotrDuz @eyalschneider How about this for a start for #402 ? There is no callback-mechanism, but you could implement your own by monitoring scheduler.getCurrentlyExecutingWithStaleHeartbeat()

#433 might be of interest to you as well.

@kagkarlsson kagkarlsson merged commit 823c9d2 into master Mar 11, 2024
13 checks passed
@kagkarlsson kagkarlsson added the released Issue has been released label Apr 18, 2024
@kagkarlsson
Copy link
Owner Author

🎉 This issue has been resolved in v14.0.0 (Release Notes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Issue has been released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant