[prev in list] [next in list] [prev in thread] [next in thread]
List: openldap-technical
Subject: Re: lmdb usage in containers
From: Howard Chu <hyc () symas ! com>
Date: 2023-08-20 18:56:36
Message-ID: cd52d33c-f2f1-09e4-629c-d2616935f1c1 () symas ! com
[Download RAW message or body]
Vitaly Repin wrote:
> Hello,
>
> I have a question about usage of the same lmdb database in different containers and \
> in the host machine.
> So far I just mapped lmdp file in docker-compose.yml:
>
> volumes:
> - "/var/spool/lmdbenv/:/var/spool/lmdbenv/"
>
> And I'm reading/writing to/from the database from different containers.
>
> Everything seems to work at a first glance.
>
> Example of adding an element to lmdb:
>
> /usr/bin/python -mlmdb --env /var/spool/lmdbenv edit \
> --set "client"="{
> \"client_ip\" : \"$client_ip\",
> \"client_data\" : \"$client_data\"
> }"
>
> Is it the proper use case for lmdb? Is there any special "flush" API which I have \
> to use to make sure that the record inserted in one container becomes visible in \
> another?
LMDB requires every process using it to have a unique PID. Usually containers all run \
their job as PID number 1, you'll have to make sure they all use unique PIDs.
> Thanks in advance!
>
> --
> WBR & WBW, Vitaly
--
-- 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