[prev in list] [next in list] [prev in thread] [next in thread]
List: openldap-technical
Subject: Re: Lock conflicts?
From: Howard Chu <hyc () symas ! com>
Date: 2024-03-12 8:02:27
Message-ID: c070c871-391e-25f0-fbfa-aa879f3819e2 () symas ! com
[Download RAW message or body]
rzhou44@tutamail.com wrote:
> Thanks, this is what I feared.
>
> Does LMDB have some ways to "lock the environment" (while still keeping \
> MDB_NOLOCK)?
MDB_NOLOCK means *none* of LMDB's locking code is used.
> 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/
>
>
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic