This repository was archived by the owner on May 25, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
This repository was archived by the owner on May 25, 2018. It is now read-only.
Can't resolve from resolved state #5
Copy link
Copy link
Open
Description
This library looks great; I'm excited that it exists. However, I'm running into some issues.
We're on sidekiq 4, so I've included celluloid in the gemfile.
From what i can tell, the symptoms I'm experiencing are similar to #3
My enqueueing code:
MrDarcy.all_promises do
contacts.map do |contact|
Workers::Contacts::Filter.as_promise(contacts.id)
end
end.then do |results|
...
end
With a sidekiq -c 20 running.
And once the number of promises created exceeds the active workers in the sidekiq pool, I get the error below sporadically. When enqueueing 1000 promises, the failure rate was roughly 8%.
E, [2016-07-20T14:46:15.793214 #5342] ERROR -- : Actor crashed!
RuntimeError: Can't resolve from resolved state
current/vendor/bundle/ruby/2.2.0/gems/mr_darcy-0.4.2/lib/mr_darcy/promise/state/base.rb:23:in `resolve'
current/vendor/bundle/ruby/2.2.0/gems/mr_darcy-0.4.2/lib/mr_darcy/promise/base.rb:110:in `state_machine_resolve'
current/vendor/bundle/ruby/2.2.0/gems/mr_darcy-0.4.2/lib/mr_darcy/promise/base.rb:82:in `do_resolve'
current/vendor/bundle/ruby/2.2.0/gems/mr_darcy-0.4.2/lib/mr_darcy/promise/celluloid.rb:52:in `block in initialize'
current/vendor/bundle/ruby/2.2.0/gems/mr_darcy-0.4.2/lib/mr_darcy/promise/celluloid.rb:27:in `call'
current/vendor/bundle/ruby/2.2.0/gems/mr_darcy-0.4.2/lib/mr_darcy/promise/celluloid.rb:27:in `set_status'
current/vendor/bundle/ruby/2.2.0/gems/celluloid-0.17.3/lib/celluloid/calls.rb:28:in `public_send'
current/vendor/bundle/ruby/2.2.0/gems/celluloid-0.17.3/lib/celluloid/calls.rb:28:in `dispatch'
current/vendor/bundle/ruby/2.2.0/gems/celluloid-0.17.3/lib/celluloid/call/async.rb:7:in `dispatch'
current/vendor/bundle/ruby/2.2.0/gems/celluloid-0.17.3/lib/celluloid/cell.rb:50:in `block in dispatch'
current/vendor/bundle/ruby/2.2.0/gems/celluloid-0.17.3/lib/celluloid/cell.rb:76:in `block in task'
current/vendor/bundle/ruby/2.2.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:339:in `block in task'
current/vendor/bundle/ruby/2.2.0/gems/celluloid-0.17.3/lib/celluloid/task.rb:44:in `block in initialize'
current/vendor/bundle/ruby/2.2.0/gems/celluloid-0.17.3/lib/celluloid/task/fibered.rb:14:in `block in create'
I haven't poked around much; this could obviously be an incompatibility with the newest version of sidekiq or sidekiq pro/ent, but I wondered if it stood out and could be something simple / related to #3's fix.
Gemfile.lock
celluloid (0.17.3)
celluloid-essentials
celluloid-extras
celluloid-fsm
celluloid-pool
celluloid-supervision
timers (>= 4.1.1)
celluloid-essentials (0.20.5)
timers (>= 4.1.1)
celluloid-extras (0.20.5)
timers (>= 4.1.1)
celluloid-fsm (0.20.5)
timers (>= 4.1.1)
celluloid-pool (0.20.5)
timers (>= 4.1.1)
celluloid-supervision (0.20.6)
timers (>= 4.1.1)
...
sidekiq (4.1.0)
concurrent-ruby (~> 1.0)
connection_pool (~> 2.2, >= 2.2.0)
redis (~> 3.2, >= 3.2.1)
sidekiq-ent (1.2.0)
algorithms
sidekiq (~> 4, >= 4.0.2)
sidekiq-pro (~> 3, >= 3.0.1)
sidekiq-pro (3.0.5)
sidekiq (>= 4.0.0)
sidekiq-promise (0.3.0)
mr_darcy (>= 0.4.0)
sidekiq (>= 3.4.0)
Metadata
Metadata
Assignees
Labels
No labels