[Fedora-directory-devel] Please review: [Bug 232050] Change format of DBVERSION and guardian files (changelog)

Noriko Hosoi nhosoi at redhat.com
Thu Mar 15 20:55:09 UTC 2007


Summary: Change format of DBVERSION and guardian files

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=232050

[Problem description]
The DBVERSION and guardian files used by the database backends should convey
some information about the database implementation used (e.g. berkeley db,
sqlite), the version, the directory server database backend used, and any other
information pertinent to the server being able to use or upgrade the files.  The
following format is proposed:
implementation/version/server backend plugin name[/other tag][/other tag]....
For example:
bdb/4.2/libback-ldbm/newidl
This indicates that the files use Berkeley DB version 4.2, they are used by the
server libback-ldbm database plugin, and the index files use the newidl format.
 The other tags are optional and may be implementation specific.  At a minimum,
the file must contain the implementation/version/pluginname.

The reasons for changing the format are as follows:
1) Make it easy for humans and code to identify what the files are, how they are
used, and how to upgrade or migrate them
2) Separate the database file version and formats from the directory server
version, vendor, and brand
3) Allow new database implementations, plugins, and features e.g.
sqlite/3.0/libback-sqlite
4) A one line description is easy to read in and easy to parse

When the server reads in a database with an old format DBVERSION or guardian
file, it will change the file to use the new format and upgrade the data as
necessary.

--------------------------------------------------------------------------------

This change is made against the changelog used by the replication plugin following the format change on the main backend.

------- Additional Comments From nhosoi at redhat.com  2007-03-15 16:39 EST -------
Created an attachment (id=150172)
 --> (https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=150172&action=view)
cvs diffs

Files:
 repl_shared.h
 cl5_api.h
 cl5_api.c

Changes:
1) change the format of changelogdb/{DBVERSION,guardian} files
   [before]
   Changelog5/NSMMReplicationPlugin/4.0
   [after]
   bdb/4.4/libreplication-plugin
   Note: changelog guardian file stores the same string as DBVERSION does,
   thus changed the format to follow the DBVERSION style.
   As being done for the backend, use DB_VERSION_MAJOR and _MINOR to get
   the current version of the Berkeley DB.
2) Added the 3-rd arg buflen to _cl5ReadDBVersion.
3) Added transaction removing code to _cl5Upgrade3_4
4) Added _cl5Upgrade4_4 which is a subset of _cl5Upgrade3_4.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20070315/a53a8e61/attachment.bin>


More information about the Fedora-directory-devel mailing list