Merge lp:~axwalk/juju-core/replicaset-close-clone into lp:~go-bot/juju-core/trunk
Proposed by
Andrew Wilkins
Status: | Merged |
---|---|
Approved by: | Andrew Wilkins |
Approved revision: | no longer in the source branch. |
Merged at revision: | 2737 |
Proposed branch: | lp:~axwalk/juju-core/replicaset-close-clone |
Merge into: | lp:~go-bot/juju-core/trunk |
Diff against target: |
19 lines (+2/-0) 1 file modified
replicaset/replicaset.go (+2/-0) |
To merge this branch: | bzr merge lp:~axwalk/juju-core/replicaset-close-clone |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+219632@code.launchpad.net |
Commit message
replicaset: close cloned sessions
Not sure if this is related to test failures,
but we should close cloned sessions anyway.
Description of the change
replicaset: close cloned sessions
Not sure if this is related to test failures,
but we should close cloned sessions anyway.
To post a comment you must log in.
Reviewers: mp+219632_ code.launchpad. net,
Message:
Please take a look.
Description:
replicaset: close cloned sessions
Not sure if this is related to test failures,
but we should close cloned sessions anyway.
https:/ /code.launchpad .net/~axwalk/ juju-core/ replicaset- close-clone/ +merge/ 219632
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/92400043/
Affected files (+4, -0 lines): replicaset. go
A [revision details]
M replicaset/
Index: [revision details] 20140515024948- mdinmvuq3nkxrxx i
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: tarmac-
+New revision: <email address hidden>
Index: replicaset/ replicaset. go replicaset. go' replicaset. go 2014-04-15 16:37:08 +0000 replicaset. go 2014-05-15 05:16:56 +0000 n.Close( ) sion.SetMode( mgo.Monotonic, true) session *mgo.Session) (*Config, error) { n.Close( ) sion.SetMode( mgo.Monotonic, true) n.DB("local" ).C("system. replset" ).Find( nil).One( cfg)
=== modified file 'replicaset/
--- replicaset/
+++ replicaset/
@@ -28,6 +28,7 @@
// details.
func Initiate(session *mgo.Session, address, name string, tags
map[string]string) error {
monotonicSession := session.Clone()
+ defer monotonicSessio
monotonicSes
cfg := Config{
Name: name,
@@ -276,6 +277,7 @@
func CurrentConfig(
cfg := &Config{}
monotonicSession := session.Clone()
+ defer monotonicSessio
monotonicSes
err := monotonicSessio
if err == mgo.ErrNotFound {