Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
worker/state: change output to *StatePool #8087
Conversation
| @@ -41,12 +41,12 @@ func StateWorkersManifold(config StateWorkersConfig) dependency.Manifold { | ||
| return nil, err | ||
| } | ||
| - st, err := stTracker.Use() | ||
| + stPool, err := stTracker.Use() |
axw
Nov 16, 2017
Member
as discussed, no, StatePool is just an implementation detail. eventually this should be replaced with a different manager object which takes responsibility for state objects and their workers
| @@ -16,46 +16,48 @@ var ErrStateClosed = errors.New("state closed") | ||
| // StateTracker describes a type which wraps and manages the lifetime | ||
| // of a *state.State. |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://ci.jujucharms.com/job/github-merge-juju |
|
Build failed: Tests failed |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://ci.jujucharms.com/job/github-merge-juju |
jujubot
merged commit 6f7c9e0
into
juju:state-controller-refactor
Nov 16, 2017
1 check failed
continuous-integration/jenkins/pr-merge
This commit cannot be built
Details
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
axw commentedNov 16, 2017
Description of change
Change worker/state to output a *state.StatePool,
rather than *state.State, and make that worker
responsible for registering state metrics and
communicating the StatePool back up to the agent
for introspection.
The other workers are updated to take a StatePool.
Of particular note, worker/apiserver now accepts
a StatePool and passes that directly to the
apiserver.NewServer call. worker/apiserver no
longer contains a worker; its manifold just calls
through to apiserver.NewServer with the configuration
derived from manifold inputs.
The worker/state worker is now responsible for
pinging all of the state objects, and removing them
from the pool when the corresponding model becomes
Dead or is removed from state.
QA steps
(should show there are two model states; the "system state" is excluded)
(should show there is just one model state, i.e. the state for "foo" should have been removed)
Documentation changes
None.
Bug reference
None.