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

Issue 30900043: state: lose machineDoc.TxnRevno

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 5 months ago by rog
Modified:
10 years, 5 months ago
Reviewers:
mp+196275, fwereade
Visibility:
Public.

Description

state: lose machineDoc.TxnRevno This means that we don't need to racily refresh a Machine immediately after adding it. Watcher code that used the revno now explicitly gets it. https://code.launchpad.net/~rogpeppe/juju-core/466-machine-no-txnrevno-2/+merge/196275 Requires: https://code.launchpad.net/~rogpeppe/juju-core/467-checkers-deepequals/+merge/196247 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : state: lose machineDoc.TxnRevno #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+388 lines, -24 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M state/addmachine.go View 1 chunk +1 line, -6 lines 0 comments Download
M state/machine.go View 2 chunks +0 lines, -2 lines 0 comments Download
M state/state_test.go View 2 chunks +6 lines, -6 lines 0 comments Download
M state/watcher.go View 6 chunks +26 lines, -10 lines 0 comments Download
M testing/checkers/bool.go View 1 chunk +25 lines, -0 lines 1 comment Download
M testing/checkers/bool_test.go View 1 chunk +9 lines, -0 lines 0 comments Download
A testing/checkers/deepequal.go View 1 chunk +165 lines, -0 lines 1 comment Download
A testing/checkers/deepequal_test.go View 1 chunk +154 lines, -0 lines 0 comments Download

Messages

Total messages: 2
rog
Please take a look.
10 years, 5 months ago (2013-11-22 13:13:24 UTC) #1
fwereade
10 years, 5 months ago (2013-12-02 09:11:40 UTC) #2
The following is contingent on the fuzzy DeepEquals being a good idea in the
first place... I suspect it's actually just going to encourage bugs, because the
distinction really does matter in entity documents -- maybe not to go, but
certainly to mongo -- and I'm not sure how helpful it is to pretend they're the
same. Assuming you convince me:

Please move all the deep-equality-related code into deepequal.go and out of
bool.go -- and I think it's probably best to avoid exporting DeepEqual itself.
If it needs an independent existence, please put it somewhere like
utils/reflect.

I'm a bit nervous about jc.DeepEquals vs gc.DeepEquals too -- I see the value of
the jc version in certain circumstances, but a one-char difference feels
somewhat developer-hostile. How about DeepAlmostEquals?

https://codereview.appspot.com/30900043/diff/20001/testing/checkers/bool.go
File testing/checkers/bool.go (right):

https://codereview.appspot.com/30900043/diff/20001/testing/checkers/bool.go#n...
testing/checkers/bool.go:91: }
This doesn't look very booley to me.

https://codereview.appspot.com/30900043/diff/20001/testing/checkers/deepequal.go
File testing/checkers/deepequal.go (right):

https://codereview.appspot.com/30900043/diff/20001/testing/checkers/deepequal...
testing/checkers/deepequal.go:155: func DeepEqual(a1, a2 interface{}) bool {
Not sure about the value of exporting this tbh.
Sign in to reply to this message.

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