[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Copies via update -- net win or net loss? (Was: svn commit: r996914 ...)

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Wed, 15 Sep 2010 13:25:16 -0400

On 09/15/2010 12:01 PM, Daniel Shahaf wrote:
> C. Michael Pilato wrote on Tue, Sep 14, 2010 at 10:58:20 -0400:
>> On 09/14/2010 10:25 AM, rhuijben_at_apache.org wrote:
>>> Author: rhuijben
>>> Date: Tue Sep 14 14:25:52 2010
>>> New Revision: 996914
>>>
>>> URL: http://svn.apache.org/viewvc?rev=996914&view=rev
>>> Log:
>>> When mixing the two major hacks of the update editor (copy_from location
>>> and file externals), we can get into an unexpected state. Update an
>>> assertion to handle this state properly and slightly update the expected
>>> test result.
>>
>> In light of our vision for the future regarding the pristine cache, and the
>> seeming flakiness of the special-case code added to handle copies during
>> update, should we kill that feature?
>
> Could someone summarize the feature/hack/special-case being discussed
> here? Is it about using the copyfrom info to optimize some over-the-wire
> transmissions during an update, as opposed to always asking for the fulltext
> of a copied file? (e.g., I found locate_copyfrom() in update-editor.c)

That's the one.

The server does a little extra work to calculate a copyfrom path, a little
extra work to authorize that path. If it all checks out, the server sends
that copyfrom info plus any additional content/prop deltas against that
copyfrom source to the client instead of just transmitting the new contents
of the copied thing in full.

If the client sees copyfrom info, it then goes to try to find that same
thing in the working copy. If it manages to find something, it does a local
copy and then applies those extra deltas (if any) from the server. If it
doesn't find the copyfrom source locally, it then asks the server for the
pristine version of the copyfrom source so it has something to apply those
deltas to.

Yeah. locate_copyfrom(). Eek.

I don't doubt that in some cases, this code might save someone a bit of
network traffic. But our vision for this code in the future involves much
more reliable, less-heuristically-driven approaches. SHA1 checksums into a
database keyed on as much, etc. I seriously believe we'd be better off
losing this codepath today, if only so we can simplify what is already a
very complex operation (update).

At this point, I'm not even really asking for permission any more. If
somebody doesn't beat me to it, I'll gut the feature myself after I wrap up
some other things that hold my attention right now.

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2010-09-15 19:26:15 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.