[prev in list] [next in list] [prev in thread] [next in thread]
List: openldap-devel
Subject: Re: Read lock without a write lock
From: Howard Chu <hyc () symas ! com>
Date: 2013-11-21 18:06:48
Message-ID: 528E4BB8.4010600 () symas ! com
[Download RAW message or body]
Milosz Tanski wrote:
> I saw that LMDB recently added a new flag MDB_NOLOCK. Is there a way
> to keep the reader lock file and but do away with the write lock?
>
> My motivation for doing this to be able to use LMDB from a process
> that forks to share the database. And the application can implement
> it's own write lock (mutex in shm or futex on linux).
What advantage do you gain from using your own write lock?
Note that forking to share the database is explicitly *not* supported.
> This would be preferable to having to do doing something like a
> MDB_NOLOCK with a pthread_rwlock since we could still have parallel
> readers with one writer.
--
-- 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