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

Issue 6678046: state: integrate service relations with life

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

Description

state: integrate service relations with life * setting a service to dying also sets all its relations to dying (units are not set to dying; we don't want any 100000-op transactions). * relations can no longer be added when involved services are not alive. * adding a relation adds to the relations refcount of each involved service. * removing a relation decrefs its services. * a service cannot be set to dead while it still has unremoved relations. * units cannot be added to a dying relation * the last unit to leave a dying relation removes it directly https://code.launchpad.net/~fwereade/juju-core/service-lifecycles/+merge/129570 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 27

Patch Set 2 : state: integrate service relations with life #

Patch Set 3 : state: integrate service relations with life #

Total comments: 26

Patch Set 4 : state: integrate service relations with life #

Patch Set 5 : state: integrate service relations with life #

Unified diffs Side-by-side diffs Delta from patch set Stats (+385 lines, -134 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M state/life_test.go View 1 1 chunk +4 lines, -2 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 2 3 5 chunks +82 lines, -35 lines 0 comments Download
M state/relation_test.go View 1 2 3 7 chunks +93 lines, -31 lines 0 comments Download
M state/service.go View 1 3 chunks +58 lines, -17 lines 0 comments Download
M state/service_test.go View 1 chunk +52 lines, -2 lines 0 comments Download
M state/state.go View 1 2 3 7 chunks +92 lines, -46 lines 0 comments Download
M worker/uniter/context_test.go View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9
fwereade
Please take a look.
11 years, 6 months ago (2012-10-13 18:49:45 UTC) #1
niemeyer
Very good stuff. Pretty much all non-trivial and sensible. Some comments: https://codereview.appspot.com/6678046/diff/1/state/relation.go File state/relation.go (right): ...
11 years, 6 months ago (2012-10-15 19:46:42 UTC) #2
fwereade
Gaah: I have a couple of preliminary thoughts, but I've just realised I missed the ...
11 years, 6 months ago (2012-10-16 06:31:39 UTC) #3
fwereade
comments to go with the latest push (was -wip) https://codereview.appspot.com/6678046/diff/1/state/relation.go File state/relation.go (right): https://codereview.appspot.com/6678046/diff/1/state/relation.go#newcode136 state/relation.go:136: ...
11 years, 6 months ago (2012-10-16 13:59:57 UTC) #4
fwereade
Please take a look.
11 years, 6 months ago (2012-10-16 15:51:18 UTC) #5
niemeyer
It's looking good, and is pretty close, but we need another round: https://codereview.appspot.com/6678046/diff/11001/state/relation.go File state/relation.go ...
11 years, 6 months ago (2012-10-17 20:52:11 UTC) #6
fwereade
Please take a look. https://codereview.appspot.com/6678046/diff/11001/state/relation.go File state/relation.go (right): https://codereview.appspot.com/6678046/diff/11001/state/relation.go#newcode238 state/relation.go:238: // ErrScopeClosed indicates that a ...
11 years, 6 months ago (2012-10-18 08:33:33 UTC) #7
niemeyer
LGTM, thanks!
11 years, 6 months ago (2012-10-18 13:47:00 UTC) #8
fwereade
11 years, 6 months ago (2012-10-18 14:12:35 UTC) #9
*** Submitted:

state: integrate service relations with life

* setting a service to dying also sets all its relations to dying (units are
  not set to dying; we don't want any 100000-op transactions).
* relations can no longer be added when involved services are not alive.
* adding a relation adds to the relations refcount of each involved service.
* removing a relation decrefs its services.
* a service cannot be set to dead while it still has unremoved relations.
* units cannot be added to a dying relation
* the last unit to leave a dying relation removes it directly

R=niemeyer
CC=
https://codereview.appspot.com/6678046
Sign in to reply to this message.

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