Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newer LMDB binary format are not supported #72

Open
tbaumann opened this issue Mar 4, 2024 · 4 comments
Open

Newer LMDB binary format are not supported #72

tbaumann opened this issue Mar 4, 2024 · 4 comments

Comments

@tbaumann
Copy link

tbaumann commented Mar 4, 2024

When testing lightningstream with my own project written in JS (See kriszyp/lmdb-js#267) I noticed that the files generated are not readable by lightningstream.

Apparently the LMDB libs were updated and new binary formats introduced. And lmdb-go is still using the old one. (kriszyp/lmdb-js#273)
Thankfully lmdb-js can fall-back to v1, but I wonder if it would be good to go with the new format here.

I guess this is more of a lmdb-go issue. Perhaps I should raise it there?

PS: In the first issue I posted I posted some code. Do you see any serious issues with it? It seems to work, but I don't have the feeling that lightningstream is yet much used outside the pdns project...

@wojas wojas added this to the v0.4.3 milestone Mar 5, 2024
@wojas
Copy link
Member

wojas commented Mar 5, 2024

Thanks for reporting!. It looks like LS is still on 1.9.0 of github.com/PowerDNS/lmdb-go. We need to update that to the latest 1.9.2.

@wojas
Copy link
Member

wojas commented Mar 5, 2024

Giving it some more thought, I would actually be surprised that an LMDB patch release (from 0.9.28 to 0.9.31) would introduce an incompatible change to the database format.

None of the changelog entries appear to suggest any such change:

LMDB 0.9.31 Release (2023/07/10)
        ITS#8447 - Fix cursor_put(MDB_CURRENT) on DUPSORT DB with different sized data

LMDB 0.9.30 Release (2023/02/08)
        ITS#9806 - LMDB page_split: key threshold depends on page size
        ITS#9916 - avoid gcc optimization bug on sparc64 linux
        ITS#9919 - Mark infrequently used functions as cold
        ITS#9723 - clear C_EOF on cursor with MDB_FIRST_DUP
        ITS#9030 - Use sys/cachectl.h rather than asm/cachectl.h on mips

LMDB 0.9.29 Release (2021/03/16)
        ITS#9461 refix ITS#9376
        ITS#9500 fix regression from ITS#8662

I am not sure what you mean by a v1 and v2 format, this sounds like an lmdb-js thing, not an LMDB thing.

@wojas wojas removed this from the v0.4.3 milestone Mar 5, 2024
@Habbie
Copy link
Member

Habbie commented Mar 5, 2024

https://github.com/kriszyp/lmdb-js/tree/dd08273cc5fa238eb86186f4b64506ee56470a51/dependencies - apparently v1 refers to the 'common' 0.9 lmdb branch, and 'not v1' refers to a copy or fork of https://github.com/LMDB/lmdb/tree/mdb.master3

@tbaumann
Copy link
Author

tbaumann commented Mar 5, 2024

It seems to basically come down to two different versions of the lmdb lib.
https://github.com/kriszyp/lmdb-js/blob/master/dependencies/lmdb-data-v1/libraries/liblmdb/CHANGES (v0.9.29)
And https://github.com/kriszyp/lmdb-js/blob/master/dependencies/lmdb/libraries/liblmdb/lmdb.h which looks like v0.9.90

PS: Ah, thanks Habbie. Looks like you got more context while I was writing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants