Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(178)

Issue 6687043: state: integrate relation membership with life

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by fwereade
Modified:
11 years, 7 months ago
Reviewers:
mp+129540, niemeyer
Visibility:
Public.

Description

state: integrate relation membership with life Please see https://codereview.appspot.com/6678046/ for relevant discussion that went in the wrong place dure to my forgetting this prereq. * scope entry is now handled by running a series of transactions, each with asserts corresponding to a valid initial state and changes transforming that state into the desired one, until one passes * scope exit leaves the settings untouched, but will (if necessary) delete the scope doc and decrement the refcount; it doesn't care about life. * a relation can become Dying regardless of its refcount. * a relation cannot become Dead while its refount is non-zero. * when a relation is removed, which cannot occur until it is Dead, a cleanup document is added to facilitate subsequent removal of unused settings documents. https://code.launchpad.net/~fwereade/juju-core/relation-lifecycles/+merge/129540 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 1

Patch Set 2 : state: integrate relation membership with life #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+297 lines, -53 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M state/open.go View 1 1 chunk +1 line, -0 lines 0 comments Download
M state/relation.go View 1 5 chunks +113 lines, -36 lines 0 comments Download
M state/relation_test.go View 1 6 chunks +91 lines, -15 lines 0 comments Download
M state/state.go View 1 4 chunks +89 lines, -1 line 1 comment Download
M worker/uniter/context_test.go View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5
fwereade
Please take a look.
11 years, 7 months ago (2012-10-13 00:29:44 UTC) #1
fwereade
A thought: https://codereview.appspot.com/6687043/diff/1/state/state.go File state/state.go (right): https://codereview.appspot.com/6687043/diff/1/state/state.go#newcode495 state/state.go:495: if err := r.st.settings.Find(sel).All(&docs); err != nil ...
11 years, 7 months ago (2012-10-14 19:44:07 UTC) #2
niemeyer
We've discussed a slightly different approach on IRC.
11 years, 7 months ago (2012-10-15 15:15:10 UTC) #3
fwereade
Please take a look.
11 years, 7 months ago (2012-10-16 10:27:30 UTC) #4
fwereade
11 years, 7 months ago (2012-10-16 13:29:22 UTC) #5
I'm rejecting this; a followup that wasn't properly -req'd has already been
reviewed, addressing everything there.

https://codereview.appspot.com/6687043/diff/6001/state/state.go
File state/state.go (left):

https://codereview.appspot.com/6687043/diff/6001/state/state.go#oldcode488
state/state.go:488: Assert: D{{"life", Dead}},
Bah, I need better ErrAborted handling below :/.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b