[Date Prev][Date Next]
RE: BDB, endian
> -----Original Message-----
> From: owner-openldap-devel@OpenLDAP.org
> [mailto:owner-openldap-devel@OpenLDAP.org]On Behalf Of Jong
> Sent: Tuesday, November 18, 2003 1:57 PM
> > back-bdb currently uses custom sort functions with its
> Btree databases
> > because otherwise the integer entry IDs don't sort
> correctly on little-endian
> > (e.g. Intel) systems. The use of custom sort functions
> means it's unsafe to
> > use SleepyCat's db_dump/db_load to backup/restore databases
> on little-endian
> > machines.
> > An alternative is to byteswap all of the entry IDs when
> they go to/from the
> > database. I think this may impose a slight performance
> cost, but it would
> > make the generic tools safe for use. Any thoughts on
> whether to make this
> > change?
> As in ldbm ?
> If we suppose that a single BDB get/put generate multiple invocations
> of the sort function, it would be even beneficial to do the
I'm testing this now. Since we no longer have to worry about the custom hash
function (with Hash databases replaced by Btree in 2.2.6) it seems this is a
good time to get rid of the custom sort functions too. Of course, this change
will require yet another full dump/reload (slapcat/slapadd) of any existing
databases on Little-Endian machines.
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
Symas: Premier OpenSource Development and Support