[prev in list] [next in list] [prev in thread] [next in thread]
List: openldap-technical
Subject: Re: Lock conflicts?
From: rzhou44 () tutamail ! com
Date: 2024-03-11 21:57:19
Message-ID: NsjWHWc--V-9 () tutamail ! com
[Download RAW message or body]
Thanks, this is what I feared.
Does LMDB have some ways to "lock the environment" (while still keeping MDB_NOLOCK)? \
This might allow me to modify that other program to "lock the environment" while it \
access the LMDB file.
With "lock the environment" I mean, blocking access for other processes. Something \
similar to MDBX_EXCLUSIVE/MDBX_BUSY in libmdbx.
(By the way, what reputation does libmdbx have in this forum? It claims to "improve" \
on LMDB but I thought I'd check here first... that project seems unmaintained for 2 \
years.)
- Zhou
Mar 11, 2024, 15:07 by hyc@symas.com:
> rzhou44@tutamail.com wrote:
>
> > At work we have a program that actively reads/writes into LMDB file. This program \
> > uses MDB_NOLOCK (why, I'm not sure yet).
> > Can I safely read/write to this LMDB file using my own programs or mdb_ command \
> > line tools?
>
> No.
>
> > I worry that those (which by default use lock files) could conflict
> > with the manual locking of the existing program and cause data corruptions.
> >
>
> You would have to use exactly the same locking code as the other program uses. And \
> the mdb_ command line tools don't support any other locking methods.
>
> --
> -- Howard Chu
> CTO, Symas Corp. http://www.symas.com
> Director, Highland Sun http://highlandsun.com/hyc/
> Chief Architect, OpenLDAP http://www.openldap.org/project/
>
[Attachment #3 (text/html)]
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<div dir="auto">Thanks, this is what I feared.<br></div><div \
dir="auto"><br></div><div dir="auto">Does LMDB have some ways to "lock the \
environment" (while still keeping MDB_NOLOCK)? This might allow me to modify that \
other program to "lock the environment" while it access the LMDB file.<br></div><div \
dir="auto"><br></div><div dir="auto">With "lock the environment" I mean, blocking \
access for other processes. Something similar to MDBX_EXCLUSIVE/MDBX_BUSY in \
libmdbx.<br></div><div dir="auto"><br></div><div dir="auto">(By the way, what \
reputation does libmdbx have in this forum? It claims to "improve" on LMDB but I \
thought I'd check here first... that project seems unmaintained for 2 \
years.)<br></div><div dir="auto"><br></div><div dir="auto">- Zhou<br></div><div \
dir="auto"><br></div><div dir="auto">Mar 11, 2024, 15:07 by \
hyc@symas.com:<br></div><blockquote class="tutanota_quote" style="border-left: 1px \
solid #93A3B8; padding-left: 10px; margin-left: 5px;"><div \
dir="auto">rzhou44@tutamail.com wrote:<br></div><blockquote><div dir="auto">At work \
we have a program that actively reads/writes into LMDB file. This program uses \
MDB_NOLOCK (why, I'm not sure yet).<br></div><div dir="auto"><br></div><div \
dir="auto">Can I safely read/write to this LMDB file using my own programs or mdb_ \
command line tools?<br></div></blockquote><div dir="auto"><br></div><div \
dir="auto">No.<br></div><blockquote><div dir="auto">I worry that those (which by \
default use lock files) could conflict<br></div><div dir="auto">with the manual \
locking of the existing program and cause data \
corruptions.<br></div></blockquote><div dir="auto"><br></div><div dir="auto">You \
would have to use exactly the same locking code as the other program uses. And the \
mdb_ command<br></div><div dir="auto">line tools don't support any other locking \
methods.<br></div><div dir="auto"><br></div><div dir="auto">-- <br></div><div \
dir="auto"> -- Howard Chu<br></div><div dir="auto"> CTO, Symas Corp. \
http://www.symas.com<br></div><div dir="auto"> Director, Highland Sun \
http://highlandsun.com/hyc/<br></div><div dir="auto"> Chief Architect, OpenLDAP \
http://www.openldap.org/project/<br></div></blockquote><div dir="auto"><br></div> \
</body> </html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic