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

Fix worker no heartbeat race condition #734

Merged
merged 2 commits into from
Dec 18, 2024
Merged

Conversation

Andyz26
Copy link
Collaborator

@Andyz26 Andyz26 commented Dec 18, 2024

Context

A race condition was introduced from #731 when a heartbeat check happened between launch event and first heartbeat and can trigger NPE on the actor.
Refactored the condition check on the case above + improve UTs to cover the related states.

Checklist

  • ./gradlew build compiles code correctly
  • Added new tests where applicable
  • ./gradlew test passes all tests
  • Extended README or added javadocs where applicable

Copy link

github-actions bot commented Dec 18, 2024

Test Results

619 tests  +1   609 ✅ +1   7m 44s ⏱️ +2s
142 suites ±0    10 💤 ±0 
142 files   ±0     0 ❌ ±0 

Results for commit 547a26d. ± Comparison against base commit e90032d.

This pull request removes 1 and adds 2 tests. Note that renamed tests count towards both.
io.mantisrx.master.jobcluster.job.JobTestLifecycle ‑ testHeartBeatMissingResubmit
io.mantisrx.master.jobcluster.job.JobTestLifecycle ‑ testHeartBeatPendingSchedulingNoResubmit
io.mantisrx.master.jobcluster.job.JobTestLifecycle ‑ testNoHeartBeatAfterLaunchResubmit

♻️ This comment has been updated with latest results.

Copy link
Contributor

@sundargates sundargates left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

> missedHeartBeatToleranceSecs) {
// heartbeat too old
// no heartbeat or heartbeat too old
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add this above line 1946

@Andyz26 Andyz26 requested a deployment to Integrate Pull Request December 18, 2024 20:30 — with GitHub Actions Waiting
@Andyz26 Andyz26 merged commit 35a0826 into master Dec 18, 2024
4 of 5 checks passed
@Andyz26 Andyz26 deleted the andyz/fixHBRaceCase1218 branch December 18, 2024 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants