httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Darroch <chr...@pearsoncmg.com>
Subject [PATCH 37533] mod_dbd pool and config handling
Date Fri, 18 Nov 2005 05:45:13 GMT
Hi --

   Nick suggested I start posting more to the list, so this
one's on his head.  :-)  Per the guidelines, the patches themselves
are in Bugzilla in bug number 37533.

   I'd also like to float the suggestion that the DBDKeep and DBDExptime
directives be renamed to match the use in mod_proxy, perhaps
DBDSoftMax and DBDTimeToLive?  (There's a comment in mod_proxy.c
that suggests that someone doesn't love the "smax" parameter name
there either, though.)

   The two patches in Bugzilla are for mod_dbd.c and mod_dbd.h,
and implement the following:

- convert expiry/time-to-live values to seconds

- make DBDKeep accept On and Off flag values

- add *_set flags to svr_cfg so that, for example, if the main server
  config specifies a non-default value, then a virtual host can
  override it
  - using the COND_PARAM(nmin, DEFAULT_NMIN) method would mean that
    a virtual host with an explicit setting of DEFAULT_NMIN via a
    DBDMin directive would be overridden by the main server's
    configuration; see mod_cache for example I cribbed from

- create a private memory pool for use by the reslist so that
  threads using the reslist via ap_dbd_acquire, etc. don't conflict
  with the owner of the pool (i.e., the pool passed in ap_run_child_init
  to dbd_setup)

- create a private memory pool for each ap_dbd_t, primarily so that
  prepared statements will be cleaned up when the connection is
  closed (otherwise they linger until the reslist or s->process->pool
  is destroyed, as do any cleanup callbacks registered in the
  apr_dbd_prepare driver code)

- wrap dbd_setup in separate logic for the init and retry cases
  - for the retry case, where init failed, create a thread mutex
    to serialize competing retries by multiple ap_dbd_open calls

- add status values to log messages where possible

- prevent params being dumped to the log file when unable to connect
  to DB since this string may contain a DB password

   Comments, flames?

Chris.

-- 
GPG Key ID: 366A375B
GPG Key Fingerprint: 485E 5041 17E1 E2BB C263  E4DE C8E3 FA36 366A 375B


Mime
View raw message