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

bug(supervisor, ttl): worker gets into the inconsistent state after TTL was reached #749

Merged
merged 3 commits into from
Jul 14, 2021

Conversation

rustatian
Copy link
Member

@rustatian rustatian commented Jul 14, 2021

Reason for This PR

closes: #748
closes: #740

Description of Changes

  • After execution worker should check its state. And if the state is not equal to the StateWorking, that means, that the worker's state was overwritten during the execution by the supervisor. In this case, the worker should return the response w/o error, and should be stopped by the supervisor or worker_watcher.
  • Add RR_BROADCAST_PATH to the WebSockets plugin.

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.

The worker after it executed the request, may overwrite the TTL state.
This inconsistency leads to the +1 worker in the FIFO channel.
In this state, the Push operation was blocked.

Add RR_BROADCAST_PATH.

Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
@rustatian rustatian added C-enhancement Category: enhancement. Meaning improvements of current module, transport, etc.. B-regression Bug: regression bugs Y-Release blocker Priority: Release blocker stable-nominated labels Jul 14, 2021
@rustatian rustatian added this to the 2.3.2 milestone Jul 14, 2021
@rustatian rustatian requested a review from wolfy-j July 14, 2021 13:58
@rustatian rustatian self-assigned this Jul 14, 2021
Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
@codecov
Copy link

codecov bot commented Jul 14, 2021

Codecov Report

Merging #749 (cb28ad0) into master (7681180) will increase coverage by 0.06%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #749      +/-   ##
==========================================
+ Coverage   67.58%   67.64%   +0.06%     
==========================================
  Files          94       94              
  Lines        4843     4846       +3     
==========================================
+ Hits         3273     3278       +5     
+ Misses       1156     1154       -2     
  Partials      414      414              
Impacted Files Coverage Δ
pkg/pool/static_pool.go 80.95% <ø> (ø)
pkg/worker_watcher/container/vec.go 100.00% <ø> (ø)
plugins/websockets/plugin.go 55.68% <33.33%> (ø)
pkg/pool/supervisor_pool.go 87.14% <100.00%> (+3.08%) ⬆️
pkg/worker/sync_worker.go 81.51% <100.00%> (+0.47%) ⬆️
pkg/worker_watcher/worker_watcher.go 81.72% <100.00%> (-0.20%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9d018f2...cb28ad0. Read the comment docs.

Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
@rustatian rustatian changed the title bug(supervisor, ttl): Fix TTL issue, added explanation comments. bug(supervisor, ttl): worker gets into the inconsistent state after TTL was reached Jul 14, 2021
@rustatian rustatian merged commit cea3f6a into master Jul 14, 2021
@bors bors bot deleted the bug/ttl_leads_to_inconsistent_FIFO branch July 14, 2021 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-regression Bug: regression bugs C-enhancement Category: enhancement. Meaning improvements of current module, transport, etc.. Y-Release blocker Priority: Release blocker
Projects
None yet
1 participant