any more sftp fixes?
John A Meinel
john at arbash-meinel.com
Fri Dec 2 02:53:24 GMT 2005
Robey Pointer wrote:
>
> On 1 Dec 2005, at 5:46, John A Meinel wrote:
>
>> Robey Pointer wrote:
>>>
>>> I'm not sure the weakref system will work, though -- I'd pondered that
>>> before, but in tests with the python CLI, the weak values were going
>>> away as soon as the last "real" reference to them died. If that's true
>>> generally, then the cache has an automatic expiration of zero seconds,
>>> making it a lot less useful. :)
>>>
>>
>> The weakref was mostly a starting point. We had some problems where
>> there were 2 paths to create a connection, and they weren't getting
>> shared.
>>
>> Long term, I wanted bzrlib to keep some sort of reference, so that a
>> front end could implement a longer-term caching policy. Such as keeping
>> a timeout list so that after a period of inactivity (say 1min/60min
>> whatever), they would be closed.
>>
>> Adding the weakref dictionary just means that bzrlib won't try to hold
>> onto them forever, but gives a place for other front-ends to acquire
>> them if it decides to create a different policy.
>
> I wonder if this maybe should be implemented at the Transport level,
> instead of per-transport (especially after hearing that FTPTransport is
> doing something similar). Is there any transport that would be hurt by
> such caching?
Because I want to cache at the connection level, not at the URL level.
So if I connect to "sftp://user@host/something" it should reuse that
connection when I connect to "sftp://user@host/somethingelse/"
So unless you require that all Transports fit exactly the URI spec with
user at host, then it needs to be done by each individual transport.
That, and LocalTransport doesn't really benefit. And I'm not sure how
HttpTransport would benefit.
John
=:->
>
> Then when we figure out a good way to make the cache have a non-zero
> timeout, all transports will win.
>
> robey
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051201/60491dcf/attachment.pgp
More information about the bazaar
mailing list