Skip to content

dispatch: rebalance users with a fixed count#2093

Merged
cyberw merged 1 commit intolocustio:masterfrom
andydunstall:bugfix/2091-fixed-count-users-not-rebalanced
May 9, 2022
Merged

dispatch: rebalance users with a fixed count#2093
cyberw merged 1 commit intolocustio:masterfrom
andydunstall:bugfix/2091-fixed-count-users-not-rebalanced

Conversation

@andydunstall
Copy link
Copy Markdown
Contributor

Fixes #2091

  • Resets the user worker count before rebalancing since _user_gen compares the expected number of fixed count users with the users in self._users_on_workers
  • Sets self._try_dispatch_fixed = True to include fixed users in the rebalance
  • Extends TestAddWorker and TestRemoveWorker to add a test for fixed count (which both fail without this commit) - these just copy test_remove_worker_during_ramp_up and test_add_worker_during_ramp_up with a fixed user

@EzR1d3r
Copy link
Copy Markdown
Contributor

EzR1d3r commented May 8, 2022

Looks fine. @cyberw @mboutet can you review too?

@cyberw
Copy link
Copy Markdown
Collaborator

cyberw commented May 8, 2022

Lgtm, but @mboutet is the user distribution expert :)

@mboutet
Copy link
Copy Markdown
Contributor

mboutet commented May 8, 2022

LGTM also! Thank you all.

@cyberw cyberw merged commit 61cb0cd into locustio:master May 9, 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.

Users with fixed_count not being relocated after rebalance

4 participants