reverting (fixing?) r2814
Nate Finch
nate.finch at canonical.com
Mon Jun 2 17:58:49 UTC 2014
Talked with John etc. Sorting is really just a lazy man's out. There's no
reason we can just search through the list and if localhost is there, dial
that one first (actually we decided it should probably *only* dial
localhost if it exists).
On Sun, Jun 1, 2014 at 8:21 AM, Andrew Wilkins <andrew.wilkins at canonical.com
> wrote:
> I haven't looked at the revision in question, so lack context, but just
> wanted to point out that sort.Stable is Go 1.2+
>
>
> On Sun, Jun 1, 2014 at 6:05 PM, John Meinel <john at arbash-meinel.com>
> wrote:
>
>> So I missed this when it was up for review, but I think the approach it
>> takes is actually incorrect.
>>
>> The patch as it stands sorts the list that we supplied to put 'localhost'
>> addresses first. However, that interferes with the logic that we want to
>> put "the last one we successfully connected to" first.
>>
>> Now, the fix *might* just be to use "sort.Stable" instead of just
>> "sort.Sort". As long as all the things that aren't "localhost" aren't
>> moved around, then we can keep the property that whatever you successfully
>> connected to last time, you'll try to use next time.
>>
>> Also, it would see the tests as written aren't actually valid because
>> something named "localhost1" is not localhost. It should probably be
>> "localhost:1" if we want to use that syntax.
>>
>> John
>> =:->
>>
>> --
>> Juju-dev mailing list
>> Juju-dev at lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju-dev
>>
>>
>
> --
> Juju-dev mailing list
> Juju-dev at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20140602/d7a42415/attachment.html>
More information about the Juju-dev
mailing list