apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject [patch] Re: apr-util/dbm/sdbm page sizes
Date Tue, 21 Oct 2003 19:12:12 GMT
For whatever reason, part of the original patch was incorrect.  Here's
the update against apr-util HEAD...

Again there is no storage/recovery of these page size parameters yet,
and we have yet to define an API for opening/creating an SDBM with
such alternatives.  It should be obvious in the open call where I've hacked
in our default values, for anyone to experiment with.

Immediate beneficiaries include mod_ssl and dav, where pages may need
to be much larger than the default.

Bill

At 02:56 PM 9/19/2003, William A. Rowe, Jr. wrote:
>As a few here already know, we used the 'Standard' page size for our
>apr-util SDBM implementation.  This assures that you can modify our
>sdbm files from perl and other tools.
>
>However, it's pretty clear that 1024 just doesn't cut it when it comes
>to huge objects from ssl caching and other sorts of large blobs.  The
>modssl project (1.3) had tweaked sdbm to take larger page sizes, but
>this leads to an inflexible implementation (another fixed page size, but
>incompatible with other implementations.)
>
>I'd like to see apr-util support alternate sized dbm pages, but without
>making fixed assumptions about those sizes (other than this - the 
>structure uses short's for offsets, so the page size does have a cap.)
>
>The attached patch allows the SDBM to be of any arbitrary data and
>directory page sizes.  However, I've not hacked in any method of
>declaring what those sizes should be (they are the 'standard' defaults
>at the moment.)
>
>What do folks believe is the most rational approach to expanding support 
>to create an sdbm with alternate page sizes?  And how best can we embed 
>that info into the sdbm so that later accesses to the file use the correct
>page size?  My current thought is to embed a NULL-key record at the head
>of the file, with a specific known value element containing some identifier
>string such as "APR-SDBM" followed by two ints, the page and data len.
>If that record is missing (or created with default sizes), the file is treated 
>as a standard sdbm with 1024/4096 sized pages.

Mime
View raw message