The Kontena::Registrator::Service actor is very sensitive to atomicity and ordering of the update, refresh, reload, stop tasks. Currently these presumably rely on the lack of any pre-emptable sleep/future/etc operations in these Celluloid Fiber tasks.
This is somewhat fragile, because if any operation is changed to invoke an operation pre-emptable by Celluloid (Pipelining and execution modes in ATOM mode), then this assumption may break.
Instead, the Service actor should probably use Exclusive mode. However, this is incompatible with the use of block yield receivers in the Kontena::Observable#observe API, which thus needs to be changed to sent updates as (ordered!) messages for exclusive execution.
The
Kontena::Registrator::Service
actor is very sensitive to atomicity and ordering of theupdate
,refresh
,reload
,stop
tasks. Currently these presumably rely on the lack of any pre-emptable sleep/future/etc operations in these Celluloid Fiber tasks.This is somewhat fragile, because if any operation is changed to invoke an operation pre-emptable by Celluloid (Pipelining and execution modes in ATOM mode), then this assumption may break.
Instead, the
Service
actor should probably use Exclusive mode. However, this is incompatible with the use of block yield receivers in theKontena::Observable#observe
API, which thus needs to be changed to sent updates as (ordered!) messages for exclusive execution.