https://bugs.openldap.org/show_bug.cgi?id=10428
Issue ID: 10428 Summary: Make larger key sizes available at compile time Product: LMDB Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: liblmdb Assignee: bugs@openldap.org Reporter: marlowsd@gmail.com Target Milestone: ---
I discovered that I can increase the key size to 1982 bytes with the following patch
``` *************** *** 1053,1059 **** #define METADATA(p) ((void *)((char *)(p) + PAGEHDRSZ))
/** ITS#7713, change PAGEBASE to handle 65536 byte pages */ ! #define PAGEBASE ((MDB_DEVEL) ? PAGEHDRSZ : 0)
/** Number of nodes on a page */ #define NUMKEYS(p) ((MP_LOWER(p) - (PAGEHDRSZ-PAGEBASE)) >> 1) --- 1054,1061 ---- #define METADATA(p) ((void *)((char *)(p) + PAGEHDRSZ))
/** ITS#7713, change PAGEBASE to handle 65536 byte pages */ ! #define PAGEBASE PAGEHDRSZ ! // #define PAGEBASE ((MDB_DEVEL) ? PAGEHDRSZ : 0)
/** Number of nodes on a page */ #define NUMKEYS(p) ((MP_LOWER(p) - (PAGEHDRSZ-PAGEBASE)) >> 1) ```
and then passing `-DMDB_MAXKEYSIZE=0` at compile time. I didn't want to use `MDB_DEVEL` because this is for a production use case.
Is this feature ready to be widely used? If so, could it be given a compile-time (or run-time) flag please?
Background: this is for Glean (https://github.com/facebookincubator/Glean/pull/663), this page explains our DB structure https://glean.software/docs/implementation/db/.
https://bugs.openldap.org/show_bug.cgi?id=10428
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |WONTFIX
--- Comment #1 from Howard Chu hyc@openldap.org --- The feature is fully usable but will not be enabled by default in v0.9 since that would make DB files that are incompatible with earlier versions. It will be enabled by default in v1.0. In the meantime, you're free to customize your own app-specific builds in whatever way you wish.
https://bugs.openldap.org/show_bug.cgi?id=10428
--- Comment #2 from marlowsd@gmail.com --- Thanks for the fast response! That's totally reasonable. The issue for us is we don't want to keep a locally-modified copy of the code. Is there a timeline for the 1.0 release? I looked around but couldn't find any information on that.
https://bugs.openldap.org/show_bug.cgi?id=10428
--- Comment #3 from Howard Chu hyc@openldap.org --- LMDB 1.0 will be released concurrently with OpenLDAP 2.7 in this quarter of this year.
https://bugs.openldap.org/show_bug.cgi?id=10428
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|WONTFIX |FIXED
--- Comment #4 from Quanah Gibson-Mount quanah@openldap.org --- commit 25a99d4024930574490f18c9eaa1e0448df34eba Author: Howard Chu hyc@symas.com Date: Mon Jan 14 13:12:15 2013 -0800
ITS#7485 check maxkeysize in mdb_cursor_put
Also MDB_MAXKEYSIZE is redefinable at compile time.
https://bugs.openldap.org/show_bug.cgi?id=10428
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.0.0 Keywords|needs_review |
https://bugs.openldap.org/show_bug.cgi?id=10428
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED