cvt_cyrusdb vs ctl_mboxlist

Rob Siemborski rjs3 at andrew.cmu.edu
Wed Sep 10 09:25:36 EDT 2003


On Wed, 10 Sep 2003, Scott Adkins wrote:

> The problem with cvt_cyrusdb is that it seems to take a record from the
> skiplist database and writes it to a file to a new flat file database.
> If we call the new database "flat.db", it would create a new file called
> "flat.db.NEW" with that one line added to the end of it, then move it to
> "flat.db" right after that.  This process would be done for every record
> in the mailboxes.db file (ours is huge!).

It *should* be doing it inside of a transaction, which should prevent this
sort of behavior, but it probably wasn't looked at very hard since the
idea was for this to be used going from berkeley to skiplist, and almost
never used to convert *to* flat.

> Wouldn't it be better to to enhance the conversion program to simply open
> the flat file database for append and just dump the contents of the old
> db right to it?  It seems like the logic for writing to a flat file db is
> prohibitively expensive.  Really, you want the conversion process from
> any database format to flat file format to dumb itself down to be what
> ctl_mboxlist does.  The reason ctl_mboxlist works so well is that it just
> dumps the output to stdout and not to a file, so there are not .NEW files
> or renames or anything like that.

The idea was that it could be used to go between any of the database
backends.  Therefore, it needs to use the cyrusdb APIs.

It should be using a transaction to do so though.

-Rob

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
Research Systems Programmer * /usr/contributed Gatekeeper





More information about the Info-cyrus mailing list