>Mon Sep 29 2008 07:55:42 EDT from IGnatius T [EMAIL PROTECTED] >Subject: Re: Citadel commit log: revision 6628 > >Does Berkeley DB even allow a partial fetch of a record? Even if it does >you're going to have to modify every single cdb_read() call in the entire >system. >
The DB_DBT_PARTIAL flag, combined with dlen and doff make partial reads possible. (http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/dbt_class html) I don't think we need to change cdb_read [cdb_fetch?] all over the entire system, but add cdb_fetch_partial, which afaik only needs to be called from CtdlFetchMessage() in order to avoid calling back the whole message for headers only. (cdb_fetch could be a thin wrapper around cdb_fetch_partial) cdb_decompress_if_necessary() might need tweaking to uncompress an incomplete input without complaining. Sam