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

Issue 8328043: state: separate infoId from entityId

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 1 month ago by rog
Modified:
11 years, 1 month ago
Reviewers:
dimitern, mp+156921, fwereade
Visibility:
Public.

Description

state: separate infoId from entityId As there's no longer a direct connection between mongo document and allInfo item, having the two things represented by the same type seems wrong, so we make the allInfo key a function of the backing implementation. https://code.launchpad.net/~rogpeppe/juju-core/266-state-infoid/+merge/156921 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 1

Patch Set 2 : state: separate infoId from entityId #

Total comments: 6

Patch Set 3 : state: separate infoId from entityId #

Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -146 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M state/megawatcher.go View 1 2 15 chunks +30 lines, -28 lines 0 comments Download
M state/megawatcher_internal_test.go View 30 chunks +85 lines, -118 lines 0 comments Download

Messages

Total messages: 5
rog
Please take a look. https://codereview.appspot.com/8328043/diff/1/state/megawatcher_internal_test.go File state/megawatcher_internal_test.go (left): https://codereview.appspot.com/8328043/diff/1/state/megawatcher_internal_test.go#oldcode908 state/megawatcher_internal_test.go:908: func (s *allWatcherStateSuite) TestStateBackingChanged(c *C) ...
11 years, 1 month ago (2013-04-03 17:34:18 UTC) #1
rog
11 years, 1 month ago (2013-04-03 17:43:25 UTC) #2
dimitern
LGTM with some trivials. https://codereview.appspot.com/8328043/diff/2001/state/megawatcher.go File state/megawatcher.go (right): https://codereview.appspot.com/8328043/diff/2001/state/megawatcher.go#newcode91 state/megawatcher.go:91: // idForInfo returns the entity ...
11 years, 1 month ago (2013-04-03 17:52:26 UTC) #3
fwereade
LGTM https://codereview.appspot.com/8328043/diff/2001/state/megawatcher.go File state/megawatcher.go (right): https://codereview.appspot.com/8328043/diff/2001/state/megawatcher.go#newcode175 state/megawatcher.go:175: if err := aw.backing.changed(aw.all, change); err != nil ...
11 years, 1 month ago (2013-04-04 06:37:28 UTC) #4
rog
11 years, 1 month ago (2013-04-05 13:59:58 UTC) #5
*** Submitted:

state: separate infoId from entityId

As there's no longer a direct connection between mongo document and
allInfo item, having the two things represented by the same type
seems wrong, so we make the allInfo key a function of the backing
implementation.

R=dimitern, fwereade
CC=
https://codereview.appspot.com/8328043

https://codereview.appspot.com/8328043/diff/2001/state/megawatcher.go
File state/megawatcher.go (right):

https://codereview.appspot.com/8328043/diff/2001/state/megawatcher.go#newcode91
state/megawatcher.go:91: // idForInfo returns the entity id corresponding
On 2013/04/03 17:52:26, dimitern wrote:
> s/entity/info/ ?

Done.

https://codereview.appspot.com/8328043/diff/2001/state/megawatcher.go#newcode418
state/megawatcher.go:418: // idForInfo returns the entity id of the given entity
document.
On 2013/04/03 17:52:26, dimitern wrote:
> s/entity/info/ ?

Done.
Sign in to reply to this message.

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