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: [email protected]
Reporter: [email protected]
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/.
--
You are receiving this mail because:
You are on the CC list for the issue.