Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

fix: incorrect worker state when worker reach IdleTTL #84

Merged
merged 2 commits into from
Aug 6, 2023

Conversation

rustatian
Copy link
Member

Reason for This PR

closes: roadrunner-server/roadrunner#1669

Description of Changes

  • Create additional worker states for max_memory/ttl/idlettl.
  • Set TTL reached state only if the worker is in ready state. Otherwise, if the worker is currently handling a request, set the invalid state so that the worker watcher (not supervisor) will reallocate such a worker when it returns a response to the user.
  • Handle SoftJob state correctly.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the MIT license.

PR Checklist

[Author TODO: Meet these criteria.]
[Reviewer TODO: Verify that these criteria are met. Request changes if not]

  • All commits in this PR are signed (git commit -s).
  • The reason for this PR is clearly provided (issue no. or explanation).
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this PR.
  • Any user-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.

Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
@rustatian rustatian requested a review from wolfy-j August 5, 2023 23:19
@rustatian rustatian self-assigned this Aug 5, 2023
@rustatian rustatian added the B-bug Bug: bug, exception label Aug 5, 2023
@rustatian rustatian changed the base branch from master to stable August 5, 2023 23:20
Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
@codecov
Copy link

codecov bot commented Aug 5, 2023

Codecov Report

Merging #84 (0f9bb09) into stable (d72a218) will decrease coverage by 0.79%.
The diff coverage is 72.34%.

@@            Coverage Diff             @@
##           stable      #84      +/-   ##
==========================================
- Coverage   83.09%   82.31%   -0.79%     
==========================================
  Files          22       22              
  Lines        1922     1922              
==========================================
- Hits         1597     1582      -15     
- Misses        270      283      +13     
- Partials       55       57       +2     
Files Changed Coverage Δ
events/events.go 66.66% <0.00%> (-4.77%) ⬇️
fsm/fsm.go 68.75% <14.28%> (-7.49%) ⬇️
worker/worker.go 83.38% <70.58%> (-1.35%) ⬇️
pool/static_pool/supervisor.go 93.57% <100.00%> (-2.13%) ⬇️
worker_watcher/worker_watcher.go 89.04% <100.00%> (ø)

... and 2 files with indirect coverage changes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
B-bug Bug: bug, exception
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Http workers stay in "invalid" status after ttl is reached
1 participant