[Date Prev][Date Next]
Re: BDB, endian
> 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
> 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
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 byteswapping.