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: stopping state when running more than one worker node. #2116

Merged
merged 2 commits into from
Jun 16, 2022

Conversation

renato-farias
Copy link
Contributor

As per the issue #2111 when running locust in distributed mode with more than 1 worker when the job is stopped the state is kept as STOPPING. Doing some investigation I realised after it removes a client from the list it gets back as a ready one, thus when the check_stopped() is called it checks the state for all clients, as the operation is fast, before checking the second client the first one is already ready and pass the update_state(STATE_STOPPED)

This PR intends to fix this bug hence to fix the continuously RPS in the graph even with the test "stopped" (issue with the graph shown bellow).

image

@cyberw
Copy link
Collaborator

cyberw commented Jun 15, 2022

Cool! Yes, the debug logging is a bit noisy :) (I wish we had a trace level though...)

@mboutet LGTY?

@cyberw
Copy link
Collaborator

cyberw commented Jun 15, 2022

Could you have a look to see if it could be added as a test?

@renato-farias
Copy link
Contributor Author

Could you have a look to see if it could be added as a test?

Added a test.

@cyberw
Copy link
Collaborator

cyberw commented Jun 16, 2022

Nice! I'll give @mboutet a couple days to chime in, but it lgtm.

@mboutet
Copy link
Contributor

mboutet commented Jun 16, 2022

LGTM also. If all tests are green, then it's good for me.

@cyberw cyberw merged commit 08a2277 into locustio:master Jun 16, 2022
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.

3 participants