Skip to content

Throttle limiter assumes a single process environment #415

@adamruzicka

Description

@adamruzicka

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions