You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consolidate input state transitions into a single code path #27536
Input runtime state is written from many places, with no single owner of the transition logic:
InputEventListener: six @Subscribe handlers (inputCreated, inputUpdated, inputStopped, inputDeleted, inputSetup, leaderChanged), each deciding what to do from its own ad-hoc read of the current state
InputLauncher.launch(): registers the state and mutates it from its own executor
InputStatesResource: persists desired_state and posts the triggering event
InputSetupService.shutDown()
These run on an AsyncEventBus concurrently with the launcher pool and REST threads, and each operation is a read-modify-write spread across several calls that the caller has to sequence correctly. The outcome depends on timing. There is also no reconciliation, so a node that misses an event stays diverged from the persisted desired_state until it restarts.
One place that owns input state transitions, so the outcome does not depend on event timing or on each caller getting the sequence right, and so a node converges on the desired state even when an event is missed. The registry, the launcher and the event handlers should not each hold a piece of the logic.
Out of scope
The read path. #25358 already moved input state reads to MongoDB.
Activity