You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@btopenworld.com> on 2010/01/06 17:03:20 UTC
Re: [PATCH] Make svn clients indicate their operation name to
backend(right now only to DAV)
On Wed, 2010-01-06 at 08:37 -0800, Justin Erenkrantz wrote:
> On Wed, Jan 6, 2010 at 7:54 AM, Mark Phippard <ma...@gmail.com> wrote:
> > Apparently, the PROPFIND is using the proxy at a time when it needs to
> > be using the master.
>
> The client has no knowledge of the master - the slave a completely
> transparent proxy. The only way to distinguish between a PROPFIND for
> an update or a commit is to have the client give some indication about
> what it's intending.
It doesn't sound like we're asking quite the right question. Rather than
"Is this PROPFIND for an update or is it for a commit?", I think we need
to be asking something like "Does this PROPFIND need to see a more
recent revision than the latest cached revision? It does if this client
has (ever) created or is currently creating a newer revision."
Another way to look at the whole issue is that the proxy should give the
client a consistent view of what revision is "head". It doesn't matter
if that revision number is a bit older than the master's head, but as
soon as that client has reason to have any knowledge of a newer revision
(e.g. by doing a commit), the proxy should from that moment onwards
provide a view of that newer revision.
The question then is how to identify "this client" - if the best
information we have is to recognize "this client connection" then we
can't support multi-connection requests automatically (except by
heuristics). In that case, the information the client needs to supply is
some sort of unique client id, or alternatively its last known head
revision number. I don't think any sort of "operation name" is
sufficient, because, for example, "svn commit" followed immediately by
"svn up" should be guaranteed to update the WC to at least the revision
number of the commit, whereas with the proposed operation-name scheme I
think it would update to the last cached revision which can be older
than the commit.
- Julian
> By using an HTTP header, the slave can check
> header and then proxy that PROPFIND to the master. (This will likely
> make all PROPFIND's on a commit hit the server, but, eh, so be it.)
> -- justin
RE: [PATCH] Make svn clients indicate their operation name to
backend(right now only to DAV)
Posted by Julian Foad <ju...@btopenworld.com>.
On Thu, 2010-01-07, Kamesh Jayachandran wrote:
> >sufficient, because, for example, "svn commit" followed immediately by
> >"svn up" should be guaranteed to update the WC to at least the revision
> >number of the commit, whereas with the proposed operation-name scheme I
> >think it would update to the last cached revision which can be older
> >than the commit.
>
> This was the case I gave patch few months back which got a negative
> reaction as it was exposing the proxy details to the mod_dav_svn's
> update_editor code.
>
> Now this patch does not affect its behaviour.
>
> wc_from_slave$svnversion
> 41
> wc_from_slave$modify something
>
> wc_from_slave$svn ci -m "commit"
> Committed 42
> wc_from_slave$svnversion
> 41:42
>
> wc_from_slave$svn up
>
> With this patch the 'svn up' scenario works as follows,
> Get the HEAD from the server via PROPFIND which would be unaffected
> with our patch as it is not for the 'commit' operation, i.e no
> preceding MKACTIVITY or SVN-ACTION != commit so *no* proxying to
> Master.
That means the 'svn up' believes that HEAD==41 and so it runs the update
editor for 'r41' with one of the child being in r42, and that gets the
update editor confused. Yes?
That is part of my concern. I think we should try to find a solution to
the commit problem that also solves this case, because then I think we
will have solved a much more general problem, not just a specific case
that is related to the way the commit operation currently works.
I suggested some other ways in an earlier email,
<http://article.gmane.org/gmane.comp.version-control.subversion.devel/117051>, namely a client unique id or the client telling the server its last known head revision number. What do you think about those? (Never mind for the moment how to generate a unique id; let's first decide if that would solve the problem.)
- Julian
> Without this patch the 'svn up' scenario works as follows,
> Get the HEAD from the server via PROPFIND which is not proxyed to
> Master.
>
> After getting the HEAD *from*(not Via) the Slave it runs the update
> editor for 'r41' with one of the child being in r42 to get update
> editor confused(That is what my patch was handling and gave a
> meaningful/less frightening message).
>
> With regards
> Kamesh Jayachandran
RE: [PATCH] Make svn clients indicate their operation name to backend(right now only to DAV)
Posted by Kamesh Jayachandran <ka...@collab.net>.
>sufficient, because, for example, "svn commit" followed immediately by
>"svn up" should be guaranteed to update the WC to at least the revision
>number of the commit, whereas with the proposed operation-name scheme I
>think it would update to the last cached revision which can be older
>than the commit.
This was the case I gave patch few months back which got a negative reaction as it was exposing the proxy details to the mod_dav_svn's update_editor code.
Now this patch does not affect its behaviour.
wc_from_slave$svnversion
41
wc_from_slave$modify something
wc_from_slave$svn ci -m "commit"
Committed 42
wc_from_slave$svnversion
41:42
wc_from_slave$svn up
With this patch the 'svn up' scenario works as follows,
Get the HEAD from the server via PROPFIND which would be unaffected with our patch as it is not for the 'commit' operation, i.e no preceding MKACTIVITY or SVN-ACTION != commit so *no* proxying to Master.
Without this patch the 'svn up' scenario works as follows,
Get the HEAD from the server via PROPFIND which is not proxyed to Master.
After getting the HEAD *from*(not Via) the Slave it runs the update editor for 'r41' with one of the child being in r42 to get update editor confused(That is what my patch was handling and gave a meaningful/less frightening message).
With regards
Kamesh Jayachandran
Re: [PATCH] Make svn clients indicate their operation name to
backend(right now only to DAV)
Posted by Julian Foad <ju...@btopenworld.com>.
I (Julian Foad) wrote:
> On Wed, 2010-01-06 at 08:37 -0800, Justin Erenkrantz wrote:
> > On Wed, Jan 6, 2010 at 7:54 AM, Mark Phippard <ma...@gmail.com> wrote:
> > > Apparently, the PROPFIND is using the proxy at a time when it needs to
> > > be using the master.
> >
> > The client has no knowledge of the master - the slave a completely
> > transparent proxy. The only way to distinguish between a PROPFIND for
> > an update or a commit is to have the client give some indication about
> > what it's intending.
>
> It doesn't sound like we're asking quite the right question. Rather than
> "Is this PROPFIND for an update or is it for a commit?", I think we need
> to be asking something like "Does this PROPFIND need to see a more
> recent revision than the latest cached revision? It does if this client
> has (ever) created or is currently creating a newer revision."
>
> Another way to look at the whole issue is that the proxy should give the
> client a consistent view of what revision is "head". It doesn't matter
> if that revision number is a bit older than the master's head, but as
> soon as that client has reason to have any knowledge of a newer revision
> (e.g. by doing a commit), the proxy should from that moment onwards
> provide a view of that newer revision.
>
> The question then is how to identify "this client" - if the best
> information we have is to recognize "this client connection" then we
> can't support multi-connection requests automatically (except by
> heuristics). In that case, the information the client needs to supply is
> some sort of unique client id, or alternatively its last known head
> revision number. I don't think any sort of "operation name" is
> sufficient, because, for example, "svn commit" followed immediately by
> "svn up" should be guaranteed to update the WC to at least the revision
> number of the commit, whereas with the proposed operation-name scheme I
> think it would update to the last cached revision which can be older
> than the commit.
When I say, "I think ...", I mean that I am just thinking through in my
head how I suppose this would work. I hope someone more knoledgeable or
who is prepared to test it will correct me if I'm wrong.
- Julian