You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Joe Orton <jo...@redhat.com> on 2009/05/20 14:18:11 UTC
mod_rewrite serialized logging - why?
mod_rewrite creates a global mutex and serializes writes to the log file
(if one is configured).
Maybe I'm being stupid here, but why is that? It seems to be
superfluous - it uses a single apr_file_write() to write a log entry, so
operates under exactly the same atomicity assumptions as mod_log_config.
Likewise, it uses a process-global apr_file_t * object which is used in
the same way in mod_log_config, so must work in threaded servers
perfectly well.
The code seems to date back to 1.3, where mod_rewrite uses an file-level
lock (fcntl/flock) in the same place; that code morphed into a different
kind of APR lock over the ages for no obvious reason.
I propose to remove the locking unless anybody objects.
Regards, Joe