Bug 37553 - mod_dbd pool and config handling
Summary: mod_dbd pool and config handling
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Other Modules (show other bugs)
Version: 2.1-HEAD
Hardware: All All
: P2 major (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2005-11-18 06:38 UTC by Chris Darroch
Modified: 2006-08-08 14:55 UTC (History)
1 user (show)



Attachments
patch for modules/database/mod_dbd.c (13.88 KB, patch)
2005-11-18 06:39 UTC, Chris Darroch
Details | Diff
patch for modules/database/mod_dbd.h (496 bytes, patch)
2005-11-18 06:39 UTC, Chris Darroch
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Darroch 2005-11-18 06:38:56 UTC
The (soon to be) attached two patches for mod_dbd.c and mod_dbd.h
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

- adds 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
Comment 1 Chris Darroch 2005-11-18 06:39:36 UTC
Created attachment 16992 [details]
patch for modules/database/mod_dbd.c
Comment 2 Chris Darroch 2005-11-18 06:39:55 UTC
Created attachment 16993 [details]
patch for modules/database/mod_dbd.h
Comment 3 Nick Kew 2005-11-22 00:50:08 UTC
Fixed in trunk; hopefully getting some review there. 
http://svn.apache.org/viewcvs?rev=348026&view=rev 
Comment 4 Nick Kew 2006-08-08 21:55:31 UTC
Was fixed in 2.2.2.