[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Repairing a lmdb database
- To: Tim Uckun <timuckun@gmail.com>
- Subject: Re: Repairing a lmdb database
- From: Howard Chu <hyc@symas.com>
- Date: Tue, 22 Nov 2016 02:19:52 +0000
- Cc: openldap-technical@openldap.org
- In-reply-to: <WM!d4684593fd2f35d23f9fcca7914c262a1e7a816b8383a0cf524bcc13c071222ef2191dccbbff65ec63f904a9a6883c68!@mailstronghold-3.zmailcloud.com>
- References: <CAGuHJrNykMX0qoBdvfQ5fgS=qVGssCHKg_5Aq1sQT7M898OrNg@mail.gmail.com> <WM!b5cdb8404d610e6435009f1c74d38806586c95d240850a8d9dc7a57c6b36fe49c3a5184c8fe8e49745278170aef52dc5!@mailstronghold-2.zmailcloud.com> <4d980d36-186e-0fb7-7419-566077dbb03d@symas.com> <CAGuHJrPAxrvO+mhneN08xQVVz-Ejft=k2f2A9FE-OBMBtkoBBA@mail.gmail.com> <WM!d4684593fd2f35d23f9fcca7914c262a1e7a816b8383a0cf524bcc13c071222ef2191dccbbff65ec63f904a9a6883c68!@mailstronghold-3.zmailcloud.com>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46a2
Tim Uckun wrote:
The language is Crystal which is still a very young language. It does not have
threading at this time so there should be no issues with mutexes. While
writing the code I never opened up a database but did repeatedly open up the
environment and if the app ran into an error while coding didn't properly
close the environment.
I didn't ask about languages, I asked about OS and LMDB version.
LMDB uses mutexes internally to serialize write transactions.
Howard while I have you on the line....
The documentation says to be very careful about closing databases and says
it's not normally necessary. I am going to omit those calls from my wrapper.
Is this OK? I will probably omit a bunch of other calls too at least from the
first release but I want to make sure I don't omit anything crucial.
Probably a good idea to omit dbi_close.
Thanks.
On Tue, Nov 22, 2016 at 7:42 AM, Howard Chu <hyc@symas.com
<mailto:hyc@symas.com>> wrote:
Tim Uckun wrote:
Hi All.
I am writing a wrapper for Lmdb for the Crystal language. During the
process
of writing my code started hanging when attempting to open a
transaction. At
first I thought I was calling the C functions wrong but it turned out
to be
some sort of a corruption in the database itself. I deleted the database
directory and the code started working fine again.
Sounds like you're not using robust mutexes. Just a guess, since you
didn't provide any info about your OS / platform or LMDB version.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
<http://www.openldap.org/project/>
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/