You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Cliff Woolley <jw...@virginia.edu> on 2002/05/23 23:21:25 UTC

apr_brigade_write() [was Re: cvs commit: apr-util/buckets apr_brigade.c]

On Thu, 23 May 2002, Cliff Woolley wrote:

> > At some point, apr_brigade_write() got broken. When the HEAP bucket at the
> > end of the brigade fills up, the flush function should be called. The
> > current code allocates *another* heap bucket. With this logic, it is
> > possible to grow a brigade without any periodic flushing. *very* bad.
>
> That could be my fault from when I got rid of the awful awful beast that
> was check_brigade_flush().  I *thought* I was very careful to keep the
> exact semantics, but I might have missed this case.  I'll take another
> look at it.

Hmmm... when SVN calls apr_brigade_write(), does it provide a flush
function or not?  Where in SVN is this, so I can take a closer look?

Thanks,
--Cliff


Re: apr_brigade_write() [was Re: cvs commit: apr-util/buckets apr_brigade.c]

Posted by Greg Stein <gs...@lyra.org>.
On Thu, May 23, 2002 at 05:21:25PM -0400, Cliff Woolley wrote:
> On Thu, 23 May 2002, Cliff Woolley wrote:
> > > At some point, apr_brigade_write() got broken. When the HEAP bucket at the
> > > end of the brigade fills up, the flush function should be called. The
> > > current code allocates *another* heap bucket. With this logic, it is
> > > possible to grow a brigade without any periodic flushing. *very* bad.
> >
> > That could be my fault from when I got rid of the awful awful beast that
> > was check_brigade_flush().  I *thought* I was very careful to keep the
> > exact semantics, but I might have missed this case.  I'll take another
> > look at it.
> 
> Hmmm... when SVN calls apr_brigade_write(), does it provide a flush
> function or not?

Definitely. We're using the various ap_f* functions, plus a bit of the
brigade functions directly.

> Where in SVN is this, so I can take a closer look?

You can see their usage in:

  http://svn.collab.net/repos/svn/trunk/subversion/mod_dav_svn/update.c
    - apr_brigade_vprintf()
    - ap_filter_flush
    
  http://svn.collab.net/repos/svn/trunk/subversion/mod_dav_svn/merge.c
    - ap_fputstrs()
    - ap_fputs()

There may be other calls. The filter stack is called 'output' in both of
those files, so you can see where they're generating the output.

Cheers,
-g

(and yes, those URLs are directly into the SVN repository; they are
 displaying the HEAD revision)

-- 
Greg Stein, http://www.lyra.org/