heed icon indicating copy to clipboard operation
heed copied to clipboard

Heed + rkyv Decoding alignment issues

Open fabianmurariu opened this issue 2 years ago • 5 comments

I'm trying to get heed + lmdn and rkyv to do zero-copy de-serialization but I'm getting Error: Decoding(ContextError(ArchiveError(Underaligned { expected_align: 8, actual_align: 1 }))) is there a way to get the correct alignment out of heed/lmdb?

this is the code https://gist.github.com/fabianmurariu/d611da188be44d7b48dedf1b3590bf7d#file-lib-rs-L99

fabianmurariu avatar Jul 29 '23 07:07 fabianmurariu

Hey @fabianmurariu 👋

You can read more about the LMDB relocation function in this thread. Unfortunately, it is not possible to force the alignment of the key/value with LMDB.

However, I would suggest you comment on the OpenLDAP ITS issue or create a new one to make it possible in the future. Howard Chu told us that Symas hired a DB developer to work on different issues.

On the other hand, you could use sanakirja to serialize and deserialize rkyv data on a disk without any copy.

Kerollmops avatar Aug 05 '23 12:08 Kerollmops