On Thu, Sep 24, 2015 at 5:13 PM, Yann Ylavic <[email protected]> wrote: > On Thu, Sep 24, 2015 at 10:22 PM, Eric Covener <[email protected]> wrote: >> On Thu, Sep 24, 2015 at 2:07 PM, Eric Covener <[email protected]> wrote: >>> First pass at removing having that stuff live in conn_rec by a filter >>> that removes itself the first time it's called: >>> >>> http://people.apache.org/~covener/patches/logio-filter.c >>> >>> Does not affect the status quo ordering problem where we might log a >>> transaction, then see the first bytes of the response go out. >>> >>> On Thu, Sep 24, 2015 at 1:50 PM, Eric Covener <[email protected]> wrote: >>>> On Thu, Sep 24, 2015 at 1:04 PM, Yann Ylavic <[email protected]> wrote: >>>>> And likewise cf->r = NULL in the logio_transaction() of the >>>>> queued/destroyed request may kill the cfg->r set by the new request's >>>>> logio_post_read_request() in the meantime. >>>> >>>> I guess this is broken without an output filter (vs re-using the >>>> add_bytes optional function) >> >> tried to improve here: http://svn.apache.org/viewvc?rev=1705134&view=rev > > Nice patch, I was thinking: too bad we need a mutex here :) > > How you measure things, network traces vs some custom log timestamp? > What does the following say? > > Index: server/core_filters.c > =================================================================== > --- server/core_filters.c (revision 1705125) > +++ server/core_filters.c (working copy) > @@ -792,6 +792,19 @@ static apr_status_t send_brigade_blocking(apr_sock > return rv; > } > > +static request_rec *get_r(apr_bucket_brigade *bb) > +{ > + apr_bucket *e; > + for (e = APR_BRIGADE_FIRST(bb); > + e != APR_BRIGADE_SENTINEL(bb); > + e = APR_BUCKET_NEXT(e)) { > + if (AP_BUCKET_IS_EOR(e)) { > + return e->data; > + } > + } > + return NULL; > +} > + > static apr_status_t writev_nonblocking(apr_socket_t *s, > struct iovec *vec, apr_size_t nvec, > apr_bucket_brigade *bb, > @@ -819,6 +832,9 @@ static apr_status_t writev_nonblocking(apr_socket_ > while (bytes_written < bytes_to_write) { > apr_size_t n = 0; > rv = apr_socket_sendv(s, vec + offset, nvec - offset, &n); > + ap_log_cerror(APLOG_MARK, APLOG_NOTICE, 0, c, > + "req:%pp: sent %" APR_SIZE_T_FMT " bytes", > + get_r(bb), n); > if (n > 0) { > bytes_written += n; > for (i = offset; i < nvec; ) { > Index: server/eor_bucket.c > =================================================================== > --- server/eor_bucket.c (revision 1705125) > +++ server/eor_bucket.c (working copy) > @@ -32,6 +32,8 @@ static apr_status_t eor_bucket_cleanup(void *data) > b->data = NULL; > /* Update child status and log the transaction */ > ap_update_child_status(r->connection->sbh, SERVER_BUSY_LOG, r); > + ap_log_cerror(APLOG_MARK, APLOG_NOTICE, 0, r->connection, > + "req:%pp: log_transaction", r); > ap_run_log_transaction(r); > if (ap_extended_status) { > ap_increment_counts(r->connection->sbh, r); > --
two logs (http/https) sorted to top of autoindex here: http://people.apache.org/~covener/ Narrow logio issue working good now, because our first filter invocation is not delayed like the "addbytes" callback was.
