Redesign TaskTracker
The current implementation of the TaskTracker has several issues that need to be fixed. After finding several races, a temporary fix added synchronization on several state changing methods, but still mutable state leaks out. See also: https://github.com/mesosphere/marathon/issues/438
Acceptance Criteria
- [ ] task state is held in an actor
- [ ] the actor uses the WhenLeader infrastructure
- [ ] reads should be served from memory, writes propagated to Zookeeper and only confirmed when Zookeeper confirmed the write
- [ ] acceptable performance
- [ ] easy to get consistent view of all tasks for an app and to get updates for this view (task update acknowledgements?)
- [ ] concept for task reconciliation
- [ ] think about Zookeeper consistence guarantees and what they mean in this context (probably we need a sync request on regaining leadership)
It should also not directly use the PersistentStore but use EntityStore.
Acceptance Criteria [...]
edit by @kolloch: moved to top
I opened two more specific issues with most of the acceptance criteria from this issue: https://github.com/mesosphere/marathon/issues/2916 and https://github.com/mesosphere/marathon/issues/2917
These two acceptance criteria got lost on purpose:
- [ ] easy to get consistent view of all tasks for an app and to get updates for this view (task update acknowledgements?)
- [ ] concept for task reconciliation
@aquamatthias or others: Do you agree that we don't need them anymore? Otherwise, please open new issues that outline what needs to be done.