[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#8181) LMDB page leaks etc when treating DBs as data
- To: openldap-its@OpenLDAP.org
- Subject: Re: (ITS#8181) LMDB page leaks etc when treating DBs as data
- From: hyc@symas.com
- Date: Thu, 30 Jul 2015 16:18:24 +0000
- Auto-submitted: auto-generated (OpenLDAP-ITS)
juerg.bircher@helmedica.com wrote:
> --_000_D1E06B6B7E2juergbircherhelmedicacom_
> Content-Type: text/plain; charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> Hi Howard,
>
> I am new to lmdb. I have been working with lmdb intensively for one month. =
> I really appreciate your great work. Good efficient C code is not always fo=
> und!
> Well I like to follow up on that reported issue.
> I am using multiple databases on the same environment. I was a bit confused=
> about your statement that most application use never subDBs? I think it is=
> a great feature that helps to support multiple indexes.
> I ran unintentionally into a related problem as I set the compare function =
> for the main db to an integer based one opposite to the literal compare fun=
> ction which is the default. Therefore when opening a database by its name t=
> he wrong database might be returned as the integer compare function might t=
> hink names are equal as only 96 bits (in my function) are compared. So the =
> compare function only compares the prefix of the database names!
> Maybe the database meta should be kept in a private space. But I also agree=
> on your statement to keep things simple. I solved the problem by never usi=
> ng the main db so under no circumstances the database meta is corrupted. I =
> think the price paid for having only named databases is very cheap as I ope=
> n databases at startup and keep the database index (dbi).
Thanks for the feedback. Yes, this is the best practice - if you're using
named databases, you should not use the main DB. (Or just make sure you don't
create name collisions.)
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/