state: Use StatePool instead of ForModel in AllModelWatcher #7513

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
Contributor

mjs commented Jun 19, 2017

This is a forward port of #7512.

Description of change

ForModel is inefficient. Starting a AllModelWatcher on a controller with many models would have had a significant resource impact.

Also a drive-by fix for an incorrect call in state/logdb.

QA steps

Bootstrapped a new controller and then connected using this client: https://gist.github.com/mjs/d9d016433e4348b4aa990a8f81d65d03

Deployed software in multiple models and ensured that all expected changes were observed.

Documentation changes

N.A.

Bug reference

https://bugs.launchpad.net/juju/+bug/1698701

mjs added some commits Jun 19, 2017

state: Use StatePool instead of ForModel in AllModelWatcher
ForModel is inefficient. Starting a AllModelWatcher on a controller
with many models would have had a significant resource impact.
apiserver/controller: Add StatePool to test facade
This is required now that the allModelWatcher uses a StatePool when
initialising.
Contributor

mjs commented Jun 19, 2017

$$merge$$

Contributor

jujubot commented Jun 19, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented Jun 19, 2017

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/11152

Owner

jameinel commented Jun 19, 2017

Contributor

mjs commented Jun 19, 2017

Abandoning this in favour of a merge

@mjs mjs closed this Jun 19, 2017

@mjs mjs deleted the mjs:1698701-AllModelWatcher-ForModel branch Jun 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment