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

Throttle limiter assumes a single process environment #415

Open
adamruzicka opened this issue Jun 16, 2022 · 0 comments
Open

Throttle limiter assumes a single process environment #415

adamruzicka opened this issue Jun 16, 2022 · 0 comments

Comments

@adamruzicka
Copy link
Contributor

Steps to reproduce:

  1. Apply the attached patch[1]
  2. Make all processes use the same DB by setting DB_CONN_STRING env variable
  3. Run an orchestrator bundle exec sidekiq -c 1 -q dynflow_orchestrator -r ./examples/remote_executor.rb
  4. Run a worker bundle exec sidekiq -c 5 -q default -r ./examples/remote_executor.rb
  5. Run another worker bundle exec sidekiq -c 5 -q default -r ./examples/remote_executor.rb
  6. Trigger the bug bundle exec ruby examples/remote_executor.rb client

The job will most likely fail with the following

undefined method `wait' for nil:NilClass (NoMethodError)
lib/dynflow/throttle_limiter.rb:71:in `block (2 levels) in handle_plans'
lib/dynflow/throttle_limiter.rb:69:in `tap'
lib/dynflow/throttle_limiter.rb:69:in `block in handle_plans'
lib/dynflow/throttle_limiter.rb:68:in `map'
lib/dynflow/throttle_limiter.rb:68:in `handle_plans'
[ concurrent-ruby ]
lib/dynflow/throttle_limiter.rb:21:in `handle_plans!'
lib/dynflow/action/with_sub_plans.rb:92:in `trigger_with_concurrency_control'
lib/dynflow/action/with_sub_plans.rb:82:in `trigger'

If not, stop all the processes, recreate the database and try again.

[1] - 0001-Reproducer-for-bug-with-concurrency-control-with-mul.patch

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

No branches or pull requests

1 participant