You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Chia-liang Kao <cl...@clkao.org> on 2005/02/23 15:52:13 UTC

ra_svn log limit and compat

Hi,

I've been trying to trace down a strange 'Malformed network data' from ra_svn. 
It turned out to be caused by the --limit compatibility.  When 1.2 client talks
to 1.1 svnserve with a limit, it's ignored by the server, but the server will
return full log.  However the response of log beyond the limit is handled, which
causes the ra session to be in an inconsistent state, and any further use of the
same session will cause the Malformed network data as there are some garbage in
the buffer.

Now, can someone fix this? :) svk blame points to... rooneg!

Cheers,
CLK



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: ra_svn log limit and compat

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Garrett Rooney wrote:

> I don't think there's any reason to add compat code...  I mean --limit 
> doesn't actually roll out until 1.2, so people will only see it in dev 
> versions of the code.  Here's a patch to make ra_svn work like ra_dav, 
> please give it a shot and let me know if it solves your problem.

After some more testing I committed this fix in revision 13171.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: ra_svn log limit and compat

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Chia-liang Kao wrote:
> On Wed, Feb 23, 2005 at 11:01:53AM -0500, Garrett Rooney wrote:
> 
>>Well, I can "fix" it in that I can make it work similarly to the way it 
>>works via DAV, just pulling down all the data and dropping it on the 
>>floor, but that kind of sucks since it means you have to actually wait 
>>for the whole log response to come back before you can return control to 
>>the user.
>>
>>Honestly, I never expected people to be reusing the connection...
> 
> 
> svk reuses ra session wherever possible.
> 
> 
>>Can anyone think of a better way to deal with this?
> 
> 
> I've just committed workaround to svn::mirror::ra, to use my own
> limit-emulating thing for 1.1 clients.  It works in the way that
> several get_log are called to construct the wanted limited logs
> as close as possible.

I don't think there's any reason to add compat code...  I mean --limit 
doesn't actually roll out until 1.2, so people will only see it in dev 
versions of the code.  Here's a patch to make ra_svn work like ra_dav, 
please give it a shot and let me know if it solves your problem.

-garrett

Re: ra_svn log limit and compat

Posted by Chia-liang Kao <cl...@clkao.org>.
On Wed, Feb 23, 2005 at 11:01:53AM -0500, Garrett Rooney wrote:
> Well, I can "fix" it in that I can make it work similarly to the way it 
> works via DAV, just pulling down all the data and dropping it on the 
> floor, but that kind of sucks since it means you have to actually wait 
> for the whole log response to come back before you can return control to 
> the user.
> 
> Honestly, I never expected people to be reusing the connection...

svk reuses ra session wherever possible.

> Can anyone think of a better way to deal with this?

I've just committed workaround to svn::mirror::ra, to use my own
limit-emulating thing for 1.1 clients.  It works in the way that
several get_log are called to construct the wanted limited logs
as close as possible.

Cheers,
CLK

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: ra_svn log limit and compat

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Chia-liang Kao wrote:
> Hi,
> 
> I've been trying to trace down a strange 'Malformed network data' from ra_svn. 
> It turned out to be caused by the --limit compatibility.  When 1.2 client talks
> to 1.1 svnserve with a limit, it's ignored by the server, but the server will
> return full log.  However the response of log beyond the limit is handled, which
> causes the ra session to be in an inconsistent state, and any further use of the
> same session will cause the Malformed network data as there are some garbage in
> the buffer.
> 
> Now, can someone fix this? :) svk blame points to... rooneg!

Well, I can "fix" it in that I can make it work similarly to the way it 
works via DAV, just pulling down all the data and dropping it on the 
floor, but that kind of sucks since it means you have to actually wait 
for the whole log response to come back before you can return control to 
the user.

Honestly, I never expected people to be reusing the connection...

Can anyone think of a better way to deal with this?

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org