On Mon, Apr 16, 2001 at 10:30:38PM -0000, firstname.lastname@example.org wrote:
> a) File contents need to be moved into a separate table.
> There will be a new table, `strings'. The keys will simply be numbers
> (or whatever -- the point is, they're not node rev IDs), and the
> values are, well, a string.
This would be a "RECNO" database in DB terms.
> c) Operate on portions of files efficiently.
> You're gonna love Berkeley DB even more after this, if that were
> possible... The basic story is, you tell your DBT you're only
> interested in a substring of the record, and then do everything else
> in the usual way. Here's how:
> dbt->flags |= DB_DBT_PARTIAL
> dbt->doff = some_offset;
> dbt->dlen = some_length;
> If it's a read operation, Berkeley will read the specified range. If
> some of those bytes don't exist, the read will still succeed, and null
> bytes will be returned for the absent ones. This is good for reading
> into a fixed-size window, I guess -- cleanses the unused portion
> automatically for you. Heh.
> If it's a write operation, and dbt->size != dbt->dlen, then that range
> of the record will grow or shrink accordingly. See
> http://www.sleepycat.com/docs/ref/am/partial.html for details.
mod_dav_svn can usually tell the FS when it wants to read the whole thing,
versus a sequence of seek/read operations. That can allow the FS to tweak
its operation accordingly. (of course, on a "read entire", it will still
want to do PARTIAL gets of some specified size)
Same for writes. We can tell the FS, "I'm going to write the whole darned
file", or "I'm going to write N bytes at offset O (which may extend the
file, but never shrink)."
Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:28 2006