improve state caching

Bug #1031546 reported by Dave Cheney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Invalid
High
Roger Peppe

Bug Description

As discussed during the July sprint, improving the caching of state objects, thereby reducing the number of error paths to be checked would be highly beneficial.

This issue is a placeholder for that discussion.

Changed in juju-core:
milestone: none → 1.2
importance: Undecided → High
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

The discussion, IIRC, evolved towards something resembling this:

- Have Refresh methods on all resources that may change

- Take the error result out of accessor methods that lookup cached information

- Have setter methods that mutate the specific field, and change the cached value

- Optionally update the cached state on mutations (even more if we're forced to reload it)

- Change watchers so they always return a new value rather than a cached one

That last step depends on lifecycle to handle removals properly.

Changed in juju-core:
status: New → Confirmed
Revision history for this message
Roger Peppe (rogpeppe) wrote :

That fits well with my recollection too.

Mark Ramm (mark-ramm)
Changed in juju-core:
assignee: nobody → Roger Peppe (rogpeppe)
Mark Ramm (mark-ramm)
Changed in juju-core:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.